Api keys
List API keys associated with a service account.
Args: service_account_id: ID of the service account to which the API keys belong. hydrate: Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. filter_model: Filter model used for pagination, sorting, filtering
Returns: All API keys matching the filter and associated with the supplied service account.
falsecreatedLogical Ops to use to combine filters on list methods.
andPossible values: 120Successful Response
Unauthorized
Not Found
Unprocessable Entity
GET /api/v1/service_accounts/{service_account_id}/api_keys HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"index": 1,
"max_size": 1,
"total_pages": 1,
"total": 1,
"items": [
{
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"key": "text",
"active": true,
"service_account": {
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"full_name": "",
"active": false,
"avatar_url": "text"
},
"metadata": {
"description": "",
"external_user_id": "123e4567-e89b-12d3-a456-426614174000"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}
},
"metadata": {
"description": "",
"retain_period_minutes": 1,
"last_login": "2026-01-01T00:00:00.000Z",
"last_rotated": "2026-01-01T00:00:00.000Z"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}
]
}Creates an API key for a service account.
Args: service_account_id: ID of the service account for which to create the API key. api_key: API key to create. auth_context: The authentication context.
Returns: The created API key.
Raises: IllegalOperationError: If the service account was created via external authentication.
Request model for API keys.
Successful Response
Response model for API keys.
falseUnauthorized
Conflict
Unprocessable Entity
POST /api/v1/service_accounts/{service_account_id}/api_keys HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"name": "text",
"description": "text"
}{
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"key": "text",
"active": true,
"service_account": {
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"full_name": "",
"active": false,
"avatar_url": "text"
},
"metadata": {
"description": "",
"external_user_id": "123e4567-e89b-12d3-a456-426614174000"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}
},
"metadata": {
"description": "",
"retain_period_minutes": 1,
"last_login": "2026-01-01T00:00:00.000Z",
"last_rotated": "2026-01-01T00:00:00.000Z"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}Returns the requested API key.
Args: service_account_id: ID of the service account to which the API key belongs. hydrate: Flag deciding whether to hydrate the output model(s) by including metadata fields in the response. api_key_name_or_id: Name or ID of the API key to return.
Returns: The requested API key.
trueSuccessful Response
Response model for API keys.
falseUnauthorized
Not Found
Unprocessable Entity
GET /api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"key": "text",
"active": true,
"service_account": {
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"full_name": "",
"active": false,
"avatar_url": "text"
},
"metadata": {
"description": "",
"external_user_id": "123e4567-e89b-12d3-a456-426614174000"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}
},
"metadata": {
"description": "",
"retain_period_minutes": 1,
"last_login": "2026-01-01T00:00:00.000Z",
"last_rotated": "2026-01-01T00:00:00.000Z"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}Updates an API key for a service account.
Args: service_account_id: ID of the service account to which the API key belongs. api_key_name_or_id: Name or ID of the API key to update. api_key_update: API key update. auth_context: The authentication context.
Returns: The updated API key.
Raises: IllegalOperationError: If the service account was created via external authentication.
Update model for API keys.
Successful Response
Response model for API keys.
falseUnauthorized
Conflict
Unprocessable Entity
PUT /api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 50
{
"name": "text",
"description": "text",
"active": true
}{
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"key": "text",
"active": true,
"service_account": {
"body": {
"created": "2026-01-01T00:00:00.000Z",
"updated": "2026-01-01T00:00:00.000Z",
"full_name": "",
"active": false,
"avatar_url": "text"
},
"metadata": {
"description": "",
"external_user_id": "123e4567-e89b-12d3-a456-426614174000"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}
},
"metadata": {
"description": "",
"retain_period_minutes": 1,
"last_login": "2026-01-01T00:00:00.000Z",
"last_rotated": "2026-01-01T00:00:00.000Z"
},
"resources": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission_denied": false,
"name": "text"
}Deletes an API key.
Args: service_account_id: ID of the service account to which the API key belongs. api_key_name_or_id: Name or ID of the API key to delete. auth_context: The authentication context.
Successful Response
Unauthorized
Not Found
Unprocessable Entity
DELETE /api/v1/service_accounts/{service_account_id}/api_keys/{api_key_name_or_id} HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?