Platform · API reference

CIBA

Standard OAuth entry points: OAuth clients, CIBA backchannel approval (poll) and Rich Authorization Requests of type provenance_action.

Related guide: CIBA authorization server

The oauth client object

Attributes

idstring
The client id (occ_…), used as client_id, iss and sub in its assertions.
objectenum
The type of object. One of oauth_client.
namestring
The name people see on the approval page ("Acme Payables").
auth_methodenum
How the client authenticates. private_key_jwt is preferred. One of private_key_jwt, client_secret_basic.
jwks_uristring | null
private_key_jwt: an https URL serving the client's public keys (cached 5 minutes).
jwksobject | null
private_key_jwt: the client's public keys inline ({ keys: [...] }, EC P-256 or OKP Ed25519).
allowed_scopesarray of strings
The scopes the client may ask for. Always includes openid.
allowed_details_typesarray of enums
The authorization_details types the client may send.
delivery_modesarray of enums
How the client learns of a decision.
notification_endpointstring | null
Ping: the registered backchannel_client_notification_endpoint (https).
statusenum
A disabled client can't authenticate. One of active, disabled.
environmentstring
The environment the client belongs to (sandbox or live).
created_attimestamp
When it was created.
updated_attimestamp
When it last changed.
last_used_attimestamp | null
When it last authenticated (to the minute); null before its first request.
client_secretstring
client_secret_basic: the secret, returned once at create and rotate.
deletedboolean
Always true for a deleted object.

The oauth client object

{
  "id": "occ_01M6VQDEB8RNTXAP66V3F2YKG8",
  "object": "oauth_client",
  "name": "Acme Payables",
  "auth_method": "private_key_jwt",
  "jwks_uri": null,
  "jwks": {
    "keys": [
      {
        "kty": "EC",
        "crv": "P-256",
        "x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
        "y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
        "kid": "acme-2026-11",
        "alg": "ES256"
      }
    ]
  },
  "allowed_scopes": [
    "openid"
  ],
  "allowed_details_types": [
    "provenance_action"
  ],
  "delivery_modes": [
    "poll"
  ],
  "notification_endpoint": null,
  "status": "active",
  "environment": "sandbox",
  "created_at": "2026-11-07T19:22:53.672Z",
  "updated_at": "2026-11-07T19:22:53.672Z",
  "last_used_at": null
}

Create an OAuth client

POST/v1/oauth/clients

Creates a confidential client for the CIBA endpoints. private_key_jwt takes a JWKS URL or inline public keys (ES256 or EdDSA); client_secret_basic returns its secret once. Pro, Growth and Enterprise; one client on the Free plan. A live-mode developer's change waits for an owner or admin.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
namestringRequired
The name people see on the approval page (1 to 80 characters).
auth_methodenum
How the client authenticates. One of private_key_jwt, client_secret_basic.
jwks_uristring
private_key_jwt: an https URL serving the client's public keys.
jwksobject
private_key_jwt: the public keys inline ({ keys: [...] }, 1 to 10).
allowed_scopesarray of strings
The scopes the client may ask for; must include openid.
allowed_details_typesarray of enums
The authorization_details types it may send.
delivery_modesarray of enums
How the client learns of a decision.
notification_endpointstring
Ping: the backchannel_client_notification_endpoint (https).

Returns

The client. A client_secret_basic client's client_secret is shown only here. See the oauth client object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Payables",
    "auth_method": "private_key_jwt",
    "jwks": {
      "keys": [
        {
          "kty": "EC",
          "crv": "P-256",
          "x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
          "y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
          "kid": "acme-2026-11",
          "alg": "ES256"
        }
      ]
    }
  }'

Response 201

{
  "id": "occ_01M6VQDEB8RNTXAP66V3F2YKG8",
  "object": "oauth_client",
  "name": "Acme Payables",
  "auth_method": "private_key_jwt",
  "jwks_uri": null,
  "jwks": {
    "keys": [
      {
        "kty": "EC",
        "crv": "P-256",
        "x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
        "y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
        "kid": "acme-2026-11",
        "alg": "ES256"
      }
    ]
  },
  "allowed_scopes": [
    "openid"
  ],
  "allowed_details_types": [
    "provenance_action"
  ],
  "delivery_modes": [
    "poll"
  ],
  "notification_endpoint": null,
  "status": "active",
  "environment": "sandbox",
  "created_at": "2026-11-07T19:22:53.672Z",
  "updated_at": "2026-11-07T19:22:53.672Z",
  "last_used_at": null
}

Get the OpenID configuration

GET/.well-known/openid-configuration

OpenID Connect discovery: the CIBA backchannel endpoint and delivery modes, the authorization_details types, the client auth methods, the token endpoint and the keys that sign id tokens. The same CIBA fields are in the RFC 8414 metadata.

No API key needed.

Parameters

No parameters.

Returns

The configuration.

Errors

curl "$PROVENANCE_API/.well-known/openid-configuration"

Response 200

{
  "issuer": "http://127.0.0.1:50287",
  "token_endpoint": "http://127.0.0.1:50287/v1/oauth/token",
  "jwks_uri": "http://127.0.0.1:50287/.well-known/jwks.json",
  "response_types_supported": [],
  "subject_types_supported": [
    "pairwise"
  ],
  "id_token_signing_alg_values_supported": [
    "ES256"
  ],
  "scopes_supported": [
    "openid"
  ],
  "claims_supported": [
    "iss",
    "sub",
    "aud",
    "… 5 more"
  ],
  "acr_values_supported": [
    "passkey",
    "biometric",
    "session"
  ],
  "backchannel_authentication_endpoint": "http://127.0.0.1:50287/v1/oauth/bc_authorize",
  "backchannel_token_delivery_modes_supported": [
    "poll",
    "ping"
  ],
  "backchannel_user_code_parameter_supported": false,
  "authorization_details_types_supported": [
    "provenance_action"
  ],
  "token_endpoint_auth_methods_supported": [
    "private_key_jwt",
    "client_secret_basic"
  ],
  "token_endpoint_auth_signing_alg_values_supported": [
    "ES256",
    "EdDSA"
  ],
  "grant_types_supported": [
    "urn:openid:params:grant-type:ciba"
  ]
}

Get an OAuth client

GET/v1/oauth/clients/{id}

One of the account's OAuth clients, without its secret.

Parameters

No parameters.

Returns

The client. See the oauth client object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Payables", "auth_method": "client_secret_basic" }' > step.json
export CLIENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null

Response 200

{
  "id": "occ_01M6VQDEB9JXE382XWMNF1HS2F",
  "object": "oauth_client",
  "name": "Acme Payables",
  "auth_method": "client_secret_basic",
  "jwks_uri": null,
  "jwks": null,
  "allowed_scopes": [
    "openid"
  ],
  "allowed_details_types": [
    "provenance_action"
  ],
  "delivery_modes": [
    "poll"
  ],
  "notification_endpoint": null,
  "status": "active",
  "environment": "sandbox",
  "created_at": "2026-11-07T19:22:53.673Z",
  "updated_at": "2026-11-07T19:22:53.673Z",
  "last_used_at": null
}

Update an OAuth client

PATCH/v1/oauth/clients/{id}

Changes the client's name, keys, allowed scopes and detail types, delivery modes or status (disabled stops it authenticating). The auth method can't change. A live-mode developer's change waits for an owner or admin.

Parameters

namestring
The name people see on the approval page.
jwks_uristring | null
private_key_jwt: an https URL serving the client's public keys.
jwksobject | null
private_key_jwt: the public keys inline.
allowed_scopesarray of strings
The scopes the client may ask for; must include openid.
allowed_details_typesarray of strings
The authorization_details types it may send.
delivery_modesarray of strings
How the client learns of a decision.
notification_endpointstring | null
Ping: the notification endpoint (https).
statusenum
disabled stops the client authenticating. One of active, disabled.

Returns

The updated client. See the oauth client object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Payables", "auth_method": "client_secret_basic" }' > step.json
export CLIENT_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "disabled" }'
curl -s -X DELETE "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null

Response 200

{
  "id": "occ_01M6VQDECQF8ZAP65CXG1SS0KH",
  "object": "oauth_client",
  "name": "Acme Payables",
  "auth_method": "client_secret_basic",
  "jwks_uri": null,
  "jwks": null,
  "allowed_scopes": [
    "openid"
  ],
  "allowed_details_types": [
    "provenance_action"
  ],
  "delivery_modes": [
    "poll"
  ],
  "notification_endpoint": null,
  "status": "disabled",
  "environment": "sandbox",
  "created_at": "2026-11-07T19:22:53.719Z",
  "updated_at": "2026-11-07T19:22:53.762Z",
  "last_used_at": null
}

List OAuth clients

GET/v1/oauth/clients

Lists the account's OAuth clients in this environment, without their secrets.

Parameters

limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.

Returns

The OAuth clients.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "occ_01M6VQDEB8RNTXAP66V3F2YKG8",
      "object": "oauth_client",
      "name": "Acme Payables",
      "auth_method": "private_key_jwt",
      "jwks_uri": null,
      "jwks": {
        "keys": [
          {
            "kty": "EC",
            "crv": "P-256",
            "x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
            "y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
            "kid": "acme-2026-11",
            "alg": "ES256"
          }
        ]
      },
      "allowed_scopes": [
        "openid"
      ],
      "allowed_details_types": [
        "provenance_action"
      ],
      "delivery_modes": [
        "poll"
      ],
      "notification_endpoint": null,
      "status": "active",
      "environment": "sandbox",
      "created_at": "2026-11-07T19:22:53.672Z",
      "updated_at": "2026-11-07T19:22:53.672Z",
      "last_used_at": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Delete an OAuth client

DELETE/v1/oauth/clients/{id}

Deletes the client. Requests it already made keep their decisions and receipts; it can't authenticate again.

Parameters

No parameters.

Returns

The deleted client. See the oauth client object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Payables", "auth_method": "client_secret_basic" }' > step.json
export CLIENT_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "occ_01M6VQDEGX6NPP3MP23RA4Y176",
  "object": "oauth_client",
  "deleted": true
}

Ask a person to approve (CIBA)

POST/v1/oauth/bc_authorize

CIBA backchannel authentication. The client authenticates (private_key_jwt or client_secret_basic), names a person the account knows with exactly one hint, and describes each action in authorization_details. The account's policy decides; an approval goes to that person. Errors follow RFC 6749 ({ error, error_description }).

No API key needed.

Parameters

No parameters.

Returns

The request is open. Poll the token endpoint with auth_req_id, at most once per interval seconds.

Errors

curl -X POST "$PROVENANCE_API/v1/oauth/bc_authorize" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "openid",
    "login_hint": "ana@acme.example",
    "binding_message": "Code 7Q4-K2",
    "authorization_details": "[{\"type\":\"provenance_action\",\"action_type\":\"pay_invoice\",\"description\":\"Pay invoice INV-1042 to Brindlecote Supplies for $2,400\",\"amount\":2400,\"currency\":\"USD\",\"counterparty\":\"brindlecote.example\"}]",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "client_assertion": "eyJhbGciOiJFUzI1NiIsImtpZCI6ImFjbWUtMjAyNi0xMSJ9.eyJpc3MiOiJvY2NfMDFNNkg5UUsyQjdROVYzTjhLNFQ2VzFZMFIifQ.c2ln"
  }'

Response 200

{
  "auth_req_id": "cba_Vq7m2KxT9nB4wC1zD3fG6hJ0kL5pSrY8aE1uR8oI2tY",
  "expires_in": 600,
  "interval": 5
}

Rotate an OAuth client's secret

POST/v1/oauth/clients/{id}/rotate_secret

client_secret_basic clients: a new secret, returned once. The old one stops working at once.

Parameters

No parameters.

Returns

The client with its new client_secret, shown only here. See the oauth client object.

Errors

export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/oauth/clients" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Payables", "auth_method": "client_secret_basic" }' > step.json
export CLIENT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID/rotate_secret" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/oauth/clients/$CLIENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null

Response 200

{
  "id": "occ_01M6VQDEE381KSGYR5YQ5GZMHJ",
  "object": "oauth_client",
  "name": "Acme Payables",
  "auth_method": "client_secret_basic",
  "jwks_uri": null,
  "jwks": null,
  "allowed_scopes": [
    "openid"
  ],
  "allowed_details_types": [
    "provenance_action"
  ],
  "delivery_modes": [
    "poll"
  ],
  "notification_endpoint": null,
  "status": "active",
  "environment": "sandbox",
  "created_at": "2026-11-07T19:22:53.763Z",
  "updated_at": "2026-11-07T19:22:53.852Z",
  "last_used_at": null,
  "client_secret": "ocs_ysBM8dn9VT-ZRIakqx51q9KRiAhZU3LuizvXNwZD54U"
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.