Admin API reference
Manage users, claims, clients and the audit log of a pforte identity service. Authenticate with an access token from the OAuth client_credentials grant of a client registered with the scope admin (everything) or directory (users and claims only). Errors are RFC 9457 application/problem+json documents.
The base address is the address of your pforte with /admin in front of the paths below, for example https://id.example.com/admin/users. This reference is made from openapi.json, which describes the same API for tools.
Users
Create, find, change and delete users; idempotent upsert by e-mail for imports.
- GET /whoami Who is calling
- GET /users List users
- POST /users Create a user
- GET /users/{id} Get a user
- PATCH /users/{id} Change a user
- DELETE /users/{id} Delete a user
- PUT /users/by-email/{email} Create or update a user by e-mail
GET /admin/whoami
Who is calling
Needs the scope directory or admin.
The caller of this request: a machine (a client with its scopes) or a person signed in to the administration UI.
Responses
- 200 Success
Body
Field Type Required Notes kindenum "client" | "user" yes clientIdstring yes scopesarray of string yes userobject or null yes - 401 unauthorized, 403 forbidden, 429 too many requests: a problem document (
application/problem+json)
GET /admin/users
List users
Needs the scope directory or admin.
Newest last. Pass nextCursor as cursor to get the following page.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
search | query | string | no | 1 to 200 characters |
status | query | enum "created" | "active" | "locked" | "deactivated" | no | |
claim | query | string | no | up to 300 characters; pattern ^[^:]+:.+$ |
cursor | query | string (uuid) | no | |
limit | query | integer | no | 1 to 200; default 50 |
Responses
- 200 Success
Body
Field Type Required Notes itemsarray of object yes items[].idstring (uuid) yes items[].emailstring yes items[].firstNamestring yes items[].lastNamestring yes items[].phonestring or null yes items[].phoneVerifiedAtstring or null yes items[].languagestring yes items[].statusenum "created" | "active" | "locked" | "deactivated" yes items[].isAdminboolean yes items[].lastLoginAtstring or null yes items[].createdAtstring yes items[].updatedAtstring yes nextCursorstring (uuid) no - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
POST /admin/users
Create a user
Needs the scope directory or admin.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string (email) | yes | |
firstName | string | yes | 1 to 200 characters |
lastName | string | yes | 1 to 200 characters |
phone | string | no | pattern ^\+[1-9]\d{6,14}$ |
language | string | no | pattern ^[a-z]{2,3}$ |
isAdmin | boolean | no |
Responses
- 201 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
GET /admin/users/{id}
Get a user
Needs the scope directory or admin.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PATCH /admin/users/{id}
Change a user
Needs the scope directory or admin.
Only the fields given are changed. Nothing is written when nothing differs.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string (email) | no | |
firstName | string | no | 1 to 200 characters |
lastName | string | no | 1 to 200 characters |
phone | string or null | no | |
language | string | no | pattern ^[a-z]{2,3}$ |
isAdmin | boolean | no |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
DELETE /admin/users/{id}
Delete a user
Needs the scope directory or admin.
Removes the user, their claims and devices. The audit log keeps who they were.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 204 No content
- 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PUT /admin/users/by-email/{email}
Create or update a user by e-mail
Needs the scope directory or admin.
Idempotent, so an hourly import can call it blindly. Updates names, phone and language; never the password, status or administrator rights. With claims, replaces the values of exactly the claim types given (see PUT /users/{id}/claims). Writes nothing and says unchanged when nothing differs. Everything happens in one transaction: if a claim is invalid, the user is not created or changed either.
With dryRun=true the same checks and the same diff run, then everything is rolled back: nothing is written and no audit event is recorded. The answer says what would happen (created, updated, unchanged) and what would change, so a dry run cannot disagree with the real call.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
dryRun | query | enum "true" | "false" | no | default "false" |
email | path | string (email) | yes |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
firstName | string | yes | 1 to 200 characters |
lastName | string | yes | 1 to 200 characters |
phone | string or null | no | |
language | string | no | pattern ^[a-z]{2,3}$ |
claims | map of array of string | no |
Responses
- 200 Success
Body
Shape 1 of 2
Field Type Required Notes dryRunenum false yes outcomeenum "updated" | "unchanged" yes userobject yes user.idstring (uuid) yes user.emailstring yes user.firstNamestring yes user.lastNamestring yes user.phonestring or null yes user.phoneVerifiedAtstring or null yes user.languagestring yes user.statusenum "created" | "active" | "locked" | "deactivated" yes user.isAdminboolean yes user.lastLoginAtstring or null yes user.createdAtstring yes user.updatedAtstring yes claimsmap of array of string yes Shape 2 of 2
Field Type Required Notes dryRunenum true yes outcomeenum "created" | "updated" | "unchanged" yes changesobject yes changes.profilemap of object yes changes.claimsmap of object yes - 201 Success
Body
Field Type Required Notes dryRunenum false yes outcomeenum "created" yes userobject yes user.idstring (uuid) yes user.emailstring yes user.firstNamestring yes user.lastNamestring yes user.phonestring or null yes user.phoneVerifiedAtstring or null yes user.languagestring yes user.statusenum "created" | "active" | "locked" | "deactivated" yes user.isAdminboolean yes user.lastLoginAtstring or null yes user.createdAtstring yes user.updatedAtstring yes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
Lifecycle
Lock, unlock, activate, deactivate, reset the password and end the sessions of a user.
- GET /users/{id}/sessions Where a user is signed in
- POST /users/{id}/lock Lock a user
- POST /users/{id}/unlock Unlock a user
- POST /users/{id}/deactivate Deactivate a user
- POST /users/{id}/activate Activate a user
- POST /users/{id}/reset-password Reset the password of a user
- POST /users/{id}/end-sessions End all sessions of a user
GET /admin/users/{id}/sessions
Where a user is signed in
Needs the scope directory or admin.
The browser sessions (single sign-on) that are open, and the applications that were granted access and stay signed in, such as an app on a phone. Identifiers and tokens are not returned. POST /users/{id}/end-sessions ends them all.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes sessionsarray of object yes sessions[].startedAtstring yes sessions[].expiresAtstring or null yes sessions[].acrstring or null yes sessions[].applicationsarray of object yes sessions[].applications[].clientIdstring yes sessions[].applications[].namestring yes grantsarray of object yes grants[].clientIdstring yes grants[].namestring yes grants[].sincestring yes grants[].expiresAtstring or null yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 429 too many requests: a problem document (
application/problem+json)
POST /admin/users/{id}/lock
Lock a user
Needs the scope directory or admin.
For a created or active user. Ends all their sessions and refresh tokens; they cannot sign in until unlocked.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
POST /admin/users/{id}/unlock
Unlock a user
Needs the scope directory or admin.
For a locked user: they become active again, or created if they never set a password. For an active user, who is not locked, nothing changes except that the failed sign-in attempts held against their address are forgotten, so they can try again at once after too many mistakes.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
POST /admin/users/{id}/deactivate
Deactivate a user
Needs the scope directory or admin.
For someone who has left. Ends all sessions and refresh tokens and cancels a pending activation link.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
POST /admin/users/{id}/activate
Activate a user
Needs the scope directory or admin.
For a created user: sends the activation link, where they choose their first password; a new call replaces the earlier link. For a deactivated user who already has a password: makes them active again, without a link. The link is never returned or logged by pforte.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes userobject yes user.idstring (uuid) yes user.emailstring yes user.firstNamestring yes user.lastNamestring yes user.phonestring or null yes user.phoneVerifiedAtstring or null yes user.languagestring yes user.statusenum "created" | "active" | "locked" | "deactivated" yes user.isAdminboolean yes user.lastLoginAtstring or null yes user.createdAtstring yes user.updatedAtstring yes activationobject yes activation.linkSentboolean yes activation.expiresAtstring or null yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
POST /admin/users/{id}/reset-password
Reset the password of a user
Needs the scope directory or admin.
For an active user. Sends them a code to choose a new password and ends all their sessions and refresh tokens, since the account may be compromised.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes idstring (uuid) yes emailstring yes firstNamestring yes lastNamestring yes phonestring or null yes phoneVerifiedAtstring or null yes languagestring yes statusenum "created" | "active" | "locked" | "deactivated" yes isAdminboolean yes lastLoginAtstring or null yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
POST /admin/users/{id}/end-sessions
End all sessions of a user
Needs the scope directory or admin.
Deletes their sessions, grants and refresh tokens and revokes their remembered devices, so they must sign in again, with a code. Their status does not change.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes sessionsEndedinteger yes -9007199254740991 to 9007199254740991 devicesRevokedinteger yes -9007199254740991 to 9007199254740991 - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 429 too many requests, 503 unavailable: a problem document (
application/problem+json)
Devices
The devices a user asked pforte to remember, so they skip the second factor there.
- GET /users/{id}/devices List the remembered devices of a user
- DELETE /users/{id}/devices Revoke all remembered devices of a user
- DELETE /users/{id}/devices/{deviceId} Revoke a remembered device
GET /admin/users/{id}/devices
List the remembered devices of a user
Needs the scope directory or admin.
Devices that skip the second factor: not revoked and not expired. Most recently seen first.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes itemsarray of object yes items[].idstring (uuid) yes items[].userAgentstring or null yes items[].createdAtstring yes items[].lastSeenAtstring yes items[].expiresAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (
application/problem+json)
DELETE /admin/users/{id}/devices
Revoke all remembered devices of a user
Needs the scope directory or admin.
Every sign-in of the user asks for the code again. Locking, deactivating, resetting the password and ending sessions do this as well.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes devicesRevokedinteger yes -9007199254740991 to 9007199254740991 - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (
application/problem+json)
DELETE /admin/users/{id}/devices/{deviceId}
Revoke a remembered device
Needs the scope directory or admin.
The next sign-in on that device asks for the code again.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes | |
deviceId | path | string (uuid) | yes |
Responses
- 204 No content
- 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found: a problem document (
application/problem+json)
Claims
The claim values of a user.
- GET /users/{id}/claims The claim values of a user
- PUT /users/{id}/claims Set claims in bulk
- POST /users/{id}/claims/{type} Add one value to a claim type
- PUT /users/{id}/claims/{type} Set the values of one claim type
- DELETE /users/{id}/claims/{type}/{value} Remove one value of a claim type
GET /admin/users/{id}/claims
The claim values of a user
Needs the scope directory or admin.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Responses
- 200 Success
Body
Field Type Required Notes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PUT /admin/users/{id}/claims
Set claims in bulk
Needs the scope directory or admin.
Replaces the values of exactly the claim types given and leaves every other claim of the user untouched. An empty list removes all values of a type. All values are checked first; if any is invalid nothing is changed.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
claims | map of array of string | yes |
Responses
- 200 Success
Body
Field Type Required Notes changedboolean yes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
POST /admin/users/{id}/claims/{type}
Add one value to a claim type
Needs the scope directory or admin.
Does nothing if the user already has the value. A single-valued type refuses a second, different value.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes | |
type | path | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
value | string | yes |
Responses
- 200 Success
Body
Field Type Required Notes changedboolean yes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PUT /admin/users/{id}/claims/{type}
Set the values of one claim type
Needs the scope directory or admin.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes | |
type | path | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
values | array of string | yes |
Responses
- 200 Success
Body
Field Type Required Notes changedboolean yes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
DELETE /admin/users/{id}/claims/{type}/{value}
Remove one value of a claim type
Needs the scope directory or admin.
Does nothing if the user does not have the value.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id | path | string (uuid) | yes | |
type | path | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
value | path | string | yes | at least 1 characters |
Responses
- 200 Success
Body
Field Type Required Notes changedboolean yes claimsmap of array of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
Claim types
The kinds of claims, and which clients receive them.
- GET /claim-types List claim types
- POST /claim-types Create a claim type
- PATCH /claim-types/{key} Change a claim type
- DELETE /claim-types/{key} Delete a claim type
- GET /clients/{clientId}/claim-types The claim types a client receives
- PUT /clients/{clientId}/claim-types Set the claim types a client receives
GET /admin/claim-types
List claim types
Needs the scope directory or admin.
Responses
- 200 Success
Body
Field Type Required Notes itemsarray of object yes items[].keystring yes items[].descriptionstring yes items[].valuePatternstring or null yes items[].multiValuedboolean yes items[].clientsarray of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
POST /admin/claim-types
Create a claim type
Needs the scope admin.
The key is the claim name in tokens. Names that tokens already use (email, name, …) are reserved.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
description | string | no | up to 500 characters |
valuePattern | string or null | no | |
multiValued | boolean | no |
Responses
- 201 Success
Body
Field Type Required Notes keystring yes descriptionstring yes valuePatternstring or null yes multiValuedboolean yes clientsarray of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PATCH /admin/claim-types/{key}
Change a claim type
Needs the scope admin.
Refused with 409 when existing values would violate the change: a new pattern they do not match, or single-valued while a user holds several values.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
key | path | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
description | string | no | up to 500 characters |
valuePattern | string or null | no | |
multiValued | boolean | no |
Responses
- 200 Success
Body
Field Type Required Notes keystring yes descriptionstring yes valuePatternstring or null yes multiValuedboolean yes clientsarray of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
DELETE /admin/claim-types/{key}
Delete a claim type
Needs the scope admin.
Refused with 409 while users hold values of it. With force=true the values are deleted too, and the audit log records how many users and values were affected.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
force | query | enum "true" | "false" | no | default "false" |
key | path | string | yes | pattern ^[a-z][a-z0-9_]{0,62}$ |
Responses
- 204 No content
- 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
GET /admin/clients/{clientId}/claim-types
The claim types a client receives
Needs the scope admin.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Responses
- 200 Success
Body
Field Type Required Notes claimTypesarray of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PUT /admin/clients/{clientId}/claim-types
Set the claim types a client receives
Needs the scope admin.
Replaces the whole set. A client only ever receives the claim types assigned to it.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
claimTypes | array of string | yes |
Responses
- 200 Success
Body
Field Type Required Notes claimTypesarray of string yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
Clients
The applications and machines that use pforte.
- GET /clients List clients
- POST /clients Register a client
- GET /clients/{clientId} Get a client
- PATCH /clients/{clientId} Change a client
- DELETE /clients/{clientId} Delete a client
- POST /clients/{clientId}/rotate-secret Replace the secret of a confidential client
GET /admin/clients
List clients
Needs the scope admin.
Responses
- 200 Success
Body
Field Type Required Notes itemsarray of object yes items[].systemboolean yes items[].clientIdstring yes items[].namestring yes items[].typeenum "public" | "confidential" yes items[].redirectUrisarray of string yes items[].postLogoutRedirectUrisarray of string yes items[].backchannelLogoutUristring or null yes items[].backchannelLogoutSessionRequiredboolean yes items[].allowedGrantsarray of string yes items[].scopesarray of string yes items[].pkceRequiredboolean yes items[].claimTypesarray of string yes items[].createdAtstring yes items[].updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
POST /admin/clients
Register a client
Needs the scope admin.
Two kinds exist. An application signs users in (authorization code flow, public or confidential) and has OpenID scopes and redirect URIs. A machine calls the admin API with the client_credentials grant and has only the scopes admin and/or directory. They never mix. A confidential client gets a generated secret, returned here once and never again. Redirect URIs must be https (http only for localhost).
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
clientId | string | yes | pattern ^[a-z0-9][a-z0-9._-]{2,62}$ |
name | string | yes | 1 to 200 characters |
type | enum "public" | "confidential" | yes | |
redirectUris | array of string | no | |
postLogoutRedirectUris | array of string | no | |
backchannelLogoutUri | string or null | no | |
backchannelLogoutSessionRequired | boolean | no | |
allowedGrants | array of string | no | |
scopes | array of string | no | |
pkceRequired | boolean | no |
Responses
- 201 Success
Body
Field Type Required Notes clientobject yes client.systemboolean yes client.clientIdstring yes client.namestring yes client.typeenum "public" | "confidential" yes client.redirectUrisarray of string yes client.postLogoutRedirectUrisarray of string yes client.backchannelLogoutUristring or null yes client.backchannelLogoutSessionRequiredboolean yes client.allowedGrantsarray of string yes client.scopesarray of string yes client.pkceRequiredboolean yes client.claimTypesarray of string yes client.createdAtstring yes client.updatedAtstring yes clientSecretstring or null yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
GET /admin/clients/{clientId}
Get a client
Needs the scope admin.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Responses
- 200 Success
Body
Field Type Required Notes systemboolean yes clientIdstring yes namestring yes typeenum "public" | "confidential" yes redirectUrisarray of string yes postLogoutRedirectUrisarray of string yes backchannelLogoutUristring or null yes backchannelLogoutSessionRequiredboolean yes allowedGrantsarray of string yes scopesarray of string yes pkceRequiredboolean yes claimTypesarray of string yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
PATCH /admin/clients/{clientId}
Change a client
Needs the scope admin.
Only the fields given are changed, and the result must still be a valid client of its kind. Takes effect at once. The last client with the admin scope cannot lose it.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | no | 1 to 200 characters |
redirectUris | array of string | no | |
postLogoutRedirectUris | array of string | no | |
backchannelLogoutUri | string or null | no | |
backchannelLogoutSessionRequired | boolean | no | |
allowedGrants | array of string | no | |
scopes | array of string | no | |
pkceRequired | boolean | no |
Responses
- 200 Success
Body
Field Type Required Notes systemboolean yes clientIdstring yes namestring yes typeenum "public" | "confidential" yes redirectUrisarray of string yes postLogoutRedirectUrisarray of string yes backchannelLogoutUristring or null yes backchannelLogoutSessionRequiredboolean yes allowedGrantsarray of string yes scopesarray of string yes pkceRequiredboolean yes claimTypesarray of string yes createdAtstring yes updatedAtstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
DELETE /admin/clients/{clientId}
Delete a client
Needs the scope admin.
Also removes its claim type assignments and revokes every grant and token issued to it. Refused for the last client with the admin scope and for the client making the call.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Responses
- 204 No content
- 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
POST /admin/clients/{clientId}/rotate-secret
Replace the secret of a confidential client
Needs the scope admin.
The old secret stops working at once. The new one is returned here once and never again.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
clientId | path | string | yes | at least 1 characters |
Responses
- 200 Success
Body
Field Type Required Notes clientSecretstring yes - 400 invalid request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict: a problem document (
application/problem+json)
Audit
Who did what, when and to whom.
- GET /audit-events List audit events
GET /admin/audit-events
List audit events
Needs the scope admin.
Newest first. Every change through the admin API and every lifecycle action is recorded with the client that made it. Pass nextCursor as cursor to get older events; the order is stable while new events arrive.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
actorType | query | enum "user" | "client" | "system" | no | |
actorId | query | string | no | at least 1 characters |
action | query | string | no | An exact action such as user.lock, or a prefix ending in * such as user.*.at least 1 characters |
targetType | query | string | no | at least 1 characters |
targetId | query | string | no | at least 1 characters |
from | query | string (date-time) | no | Only events at or after this time (ISO 8601). |
to | query | string (date-time) | no | Only events before this time (ISO 8601). |
cursor | query | string (uuid) | no | |
limit | query | integer | no | 1 to 200; default 50 |
Responses
- 200 Success
Body
Field Type Required Notes itemsarray of object yes items[].idstring (uuid) yes items[].createdAtstring yes items[].actorTypeenum "user" | "client" | "system" yes items[].actorIdstring or null yes items[].actionstring yes items[].targetTypestring or null yes items[].targetIdstring or null yes items[].detailsmap of any yes items[].ipstring or null yes items[].userAgentstring or null yes nextCursorstring (uuid) no - 400 invalid request, 401 unauthorized, 403 forbidden: a problem document (
application/problem+json)