Herald
OpenapiClient

Create a new client app

Creates a new OAuth client application with the specified configuration.

POST
/api/client

Creates a new OAuth client application with the specified configuration.

Request Body

application/json
  1. body

Request to create a new OAuth client application

allowedOrigins?array<string>|null
browserRefreshAbsoluteTtlSeconds?|
Formatint32
clientId*string

OAuth client identifier (3-36 characters)

Used as the client_id in OAuth flows. Must be unique within the realm. Can contain alphanumeric characters only.

description?|

Detailed description of the client application (max 500 characters)

Optional description explaining the purpose and functionality of the application.

deviceCodeGrantEnabled?boolean|null
emailVerifyReturnUrl?string|null
enabled?|

Whether this client application is active

When set to false, the client cannot be used for new OAuth flows.

iconUrl?|

URL to client application icon (favicon, logo)

Optional URL to an image file that will be displayed as the app icon. Should be a valid HTTPS URL to an image resource.

name*string

Human-readable application name (1-100 characters)

Display name shown to users in authorization screens and admin panels.

passwordResetReturnUrl?string|null
redirectUris?array<string>|

Allowed OAuth redirect URIs

List of valid redirect URIs for OAuth flows. Must be valid HTTPS URLs (http://localhost is allowed for development). Users will only be redirected to these URIs after authentication.

turnstileEnabled?|

Enable Cloudflare Turnstile human-verification for this Client App (D-PROTECT-01). Defaults to false.

turnstileSecretKey?|

Cloudflare Turnstile secret key (server-side, sensitive). Write-only: never echoed back in responses.

turnstileSiteKey?|

Cloudflare Turnstile site key (public). Optional; only used when Turnstile is enabled.

Response Body

ClientApp created

application/json
  1. response
allowedOrigins*array<string>
browserRefreshAbsoluteTtlSeconds*integer
Formatint32
clientId*string

OAuth client_id (used in OAuth flows)

The public identifier used in OAuth authorization flows.

clientSecret?|

OAuth client secret (only shown during creation)

The secret key used for confidential client authentication in OAuth flows. Store this securely - it will not be retrievable after the initial creation response. This field will be null in update and list responses.

description?|

Detailed description

Description explaining the purpose and functionality of the application.

deviceCodeGrantEnabled*boolean
emailVerifyReturnUrl?string|null
enabled*boolean

Whether this client is currently enabled

When false, the client cannot be used for new OAuth flows.

iconUrl?|

Application icon URL

URL to an image file that will be displayed as the app icon.

id*string

Client application UUID

Internal unique identifier for the client application.

Formatuuid
isFirstParty*boolean
isSystemBuiltin*boolean

Read-only resource-protection flag: true for the two built-in UI clients, the built-in API Key client, and the built-in MCP client. Not a user permission — callers still need clients.view/manage.

name*string

Human-readable application name

Display name shown to users in authorization screens and admin panels.

passwordResetReturnUrl?string|null
realmId*string

Realm this client belongs to

The realm ID that this client application is associated with.

redirectUris*array<string>

Allowed OAuth redirect URIs

List of valid redirect URIs for OAuth flows. Users will only be redirected to these URIs after authentication.

turnstileEnabled*boolean

Whether Cloudflare Turnstile human-verification is enforced for this Client App (D-PROTECT-01).

turnstileSiteKey?|

Cloudflare Turnstile site key (public), shown to the client widget. None when Turnstile is disabled.

Example Request
curl -X POST 'https://example.com/api/client' \
  -H 'Content-Type: application/json' \
  -d '{
  "clientId": "string",
  "name": "string"
}'
Example Response
{
  "allowedOrigins": [
    "string"
  ],
  "browserRefreshAbsoluteTtlSeconds": 0,
  "clientId": "string",
  "clientSecret": "string",
  "description": "string",
  "deviceCodeGrantEnabled": true,
  "emailVerifyReturnUrl": "string",
  "enabled": true,
  "iconUrl": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "isFirstParty": true,
  "isSystemBuiltin": true,
  "name": "string",
  "passwordResetReturnUrl": "string",
  "realmId": "string",
  "redirectUris": [
    "string"
  ],
  "turnstileEnabled": true,
  "turnstileSiteKey": "string"
}