Create a new client app
Creates a new OAuth client application with the specified configuration.
Creates a new OAuth client application with the specified configuration.
application/json- body
Request to create a new OAuth client application
allowedOrigins?array<string>|nullbrowserRefreshAbsoluteTtlSeconds?|int32clientId*stringOAuth 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|nullemailVerifyReturnUrl?string|nullenabled?|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*stringHuman-readable application name (1-100 characters)
Display name shown to users in authorization screens and admin panels.
passwordResetReturnUrl?string|nullredirectUris?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.
ClientApp created
application/json- response
allowedOrigins*array<string>browserRefreshAbsoluteTtlSeconds*integerint32clientId*stringOAuth 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*booleanemailVerifyReturnUrl?string|nullenabled*booleanWhether 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*stringClient application UUID
Internal unique identifier for the client application.
uuidisFirstParty*booleanisSystemBuiltin*booleanRead-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*stringHuman-readable application name
Display name shown to users in authorization screens and admin panels.
passwordResetReturnUrl?string|nullrealmId*stringRealm 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*booleanWhether 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.
curl -X POST 'https://example.com/api/client' \
-H 'Content-Type: application/json' \
-d '{
"clientId": "string",
"name": "string"
}'{
"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"
}