Skip to content
Dashboard
Theme
Theme

Change a client's name, scopes, audiences, lifetime or JWKS

PATCH /v1/m2m_clients/{client}: Change a client's name, scopes, audiences, lifetime or JWKS.

View Markdown

PATCH /v1/m2m_clients/{client}

Scope
machine_clients:write
Auth
Secret key (sk_…)
Since
1.0
  • client string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • name string

    min length 1 · max length 200

  • jwks object

  • scopes array of string

    max items 100

  • audiences array of string

    min items 1 · max items 20

  • access_token_seconds integer

    min 60 · max 3600

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/m2m_clients/mcli_01J9Z3K5V7W8X9Y0Z1A2B3C4D5" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"jwks": {},
"scopes": [
"organizations:read"
],
"audiences": [
"https://api.acme.com"
],
"access_token_seconds": 60
}'
Response 200
{
"id": "mcli_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "m2m_client",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"name": "Acme Corp",
"auth_method": "client_secret",
"secret_hint": "example_secret_hint",
"previous_secret_expires_at": "2026-01-15T09:30:00Z",
"jwks": {},
"scopes": [
"organizations:read"
],
"audiences": [
"https://api.acme.com"
],
"access_token_seconds": 60,
"revoked_at": "2026-01-15T09:30:00Z",
"last_used_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}