Skip to main content

Key Managers

Create a key manager​

POST /key-managers

Code samples


curl -X POST https://localhost:9543/api-portal/api/v0.9/key-managers \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Creates a key manager configuration for the organization. If id is omitted, the service generates a UUID handle. Accepts either a application/json body or a multipart/form-data upload with a keymanager field containing the KeyManager YAML file. OAuth applications are created directly in the key manager itself, outside the portal — the portal only needs the token endpoint to proxy client_appKeyMappings token requests.

Payload

{
"displayName": "Asgardeo",
"id": "asgardeo-prod",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token"
}
displayName: Asgardeo
id: asgardeo-prod
enabled: true
tokenEndpoint: https://api.asgardeo.io/t/myorg/oauth2/token

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:key_manager:create`, `dp:key_manager:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyKeyManagerRequestfalseKey manager configuration payload. Submit as application/json or as multipart/form-data with a keymanager field containing a KeyManager YAML file.

Example responses

201 Response

{
"id": "asgardeo-prod",
"displayName": "Asgardeo",
"orgId": "org-12345",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token",
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
201CreatedKey manager configuration response.KeyManagerResponseSchema
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the created key manager.

List key managers​

GET /key-managers

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/key-managers \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Returns key manager configurations for the organization. Admins receive the full configuration for every key manager, including disabled ones; other callers receive the minimal, developer-facing view of enabled key managers only, with no admin credentials. Admin appKeyMappings are never included in the response.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:key_manager:read`, `dp:application_key_mapping:read`

Parameters​

NameInTypeRequiredDescription
limitqueryintegerfalseMaximum number of records to return.
offsetqueryintegerfalseNumber of records to skip before returning results.

Example responses

200 Response

{
"list": [
{
"id": "asgardeo-prod",
"displayName": "Asgardeo",
"orgId": "org-12345",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token",
"createdBy": "[email protected]",
"createdAt": "2026-05-07T08:30:00Z",
"updatedAt": "2026-05-07T08:30:00Z"
}
],
"count": 1,
"pagination": {
"total": 42,
"limit": 20,
"offset": 0
}
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKList of key manager configurations. Admins receive KeyManagerResponseSchema items; other callers receive the minimal KeyManagerPublicResponseSchema items.Inline
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
» list[anyOf]falsenonenone

anyOf

NameTypeRequiredRestrictionsDescription
»» anonymousKeyManagerResponseSchemafalsenoneKey manager configuration.
»»» idstringfalsenoneThe key manager's handle (unique per org). Not the internal database uuid.
»»» displayNamestringfalsenonenone
»»» orgIdstringfalsenonenone
»»» enabledbooleanfalsenonenone
»»» tokenEndpointstring(uri)falsenonenone
»»» createdBystringfalsenoneIdentity of the user who created this key manager, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses and list items.
»»» updatedBystringfalsenoneIdentity of the user who last updated this key manager, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses only, omitted on list items.
»»» createdAtstring(date-time)falsenonenone
»»» updatedAtstring(date-time)falsenonenone

or

NameTypeRequiredRestrictionsDescription
»» anonymousKeyManagerPublicResponseSchemafalsenoneMinimal developer-facing key manager view.
»»» idstringfalsenoneThe key manager's handle (unique per org). Not the internal database uuid.
»»» displayNamestringfalsenonenone
»»» tokenEndpointstring(uri)falsenonenone

continued

NameTypeRequiredRestrictionsDescription
» countintegerfalsenoneNumber of items returned in this page.
» paginationPaginationfalsenoneStandard pagination metadata returned with collection responses.
»» totalintegertruenoneTotal number of records matching the query.
»» limitintegertruenoneMaximum number of records returned in this response.
»» offsetintegertruenoneNumber of records skipped before this page.

Get a key manager​

GET /key-managers/{kmId}

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a single key manager configuration by ID.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:key_manager:read`, `dp:key_manager:manage`

Parameters​

NameInTypeRequiredDescription
kmIdpathstringtrueThe key manager's handle (its id in request/response payloads), not the internal database uuid.

Example responses

200 Response

{
"id": "asgardeo-prod",
"displayName": "Asgardeo",
"orgId": "org-12345",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token",
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKKey manager configuration response.KeyManagerResponseSchema
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Update a key manager​

PUT /key-managers/{kmId}

Code samples


curl -X PUT https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Updates an existing key manager configuration. Accepts either a application/json body or a multipart/form-data upload with a keymanager YAML file. Only supplied fields are updated; omitted fields retain their stored values.

Payload

{
"displayName": "Asgardeo",
"id": "asgardeo-prod",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token"
}
displayName: Asgardeo
id: asgardeo-prod
enabled: true
tokenEndpoint: https://api.asgardeo.io/t/myorg/oauth2/token

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:key_manager:update`, `dp:key_manager:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyKeyManagerUpdateRequestfalseKey manager update payload. All fields are optional; only supplied fields are updated. Submit as application/json or as multipart/form-data with a keymanager field containing a KeyManager YAML file.
kmIdpathstringtrueThe key manager's handle (its id in request/response payloads), not the internal database uuid.

Example responses

200 Response

{
"id": "asgardeo-prod",
"displayName": "Asgardeo",
"orgId": "org-12345",
"enabled": true,
"tokenEndpoint": "https://api.asgardeo.io/t/myorg/oauth2/token",
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKKey manager configuration response.KeyManagerResponseSchema
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Delete a key manager​

DELETE /key-managers/{kmId}

Code samples


curl -X DELETE https://localhost:9543/api-portal/api/v0.9/key-managers/{kmId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Deletes a key manager configuration by ID.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:key_manager:delete`, `dp:key_manager:manage`

Parameters​

NameInTypeRequiredDescription
kmIdpathstringtrueThe key manager's handle (its id in request/response payloads), not the internal database uuid.

Example responses

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
204No ContentKey manager deleted successfully.None
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Was this page helpful?