Get User API Keys
GET/company/apikey/
Retrieves all API Keys created by the authenticated user.
Operation Flow:
- Validate that the user exists and belongs to a company
- Find all keys associated with the user's ID
- Partially hide the keys for security (display first 8 and last 4 characters)
- Return the list of keys with their metadata
Important Considerations:
- Keys are displayed partially hidden for security
- To obtain a complete key, a new one must be created
- Requires valid JWT authentication
- Only returns the user's own keys
Response Example:
{
apikeys: [
{
key: sk_live_*****cdef,
type: write,
created_at: 2024-01-15T10:30:00Z
},
{
key: sk_test_*****1234,
type: read,
created_at: 2024-01-10T08:15:00Z
}
]
}
Possible Errors:
- 401: Not authenticated or invalid token
- 404: User not found or has no registered keys
Responses
- 200
- 401
- 404
List of API Keys
Unauthorized
Not found