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 asclient_id,issandsubin 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_jwtis preferred. One ofprivate_key_jwt,client_secret_basic. jwks_uristring | nullprivate_key_jwt: an https URL serving the client's public keys (cached 5 minutes).jwksobject | nullprivate_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_detailstypes 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 (
sandboxorlive). 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_secretstringclient_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_uristringprivate_key_jwt: an https URL serving the client's public keys.jwksobjectprivate_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_detailstypes 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"
}
]
}
}'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"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"
}
]
}
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"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"
}
]
}
}).json()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"const data = await (await fetch(`${process.env.PROVENANCE_API}/.well-known/openid-configuration`)).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/.well-known/openid-configuration").json()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/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "Acme Payables", "auth_method": "client_secret_basic" }),
})).json();
const clientId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients/${clientId}`, {
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Acme Payables",
"auth_method": "client_secret_basic"
}).json()
client_id = step1["id"]
data = httpx.get(f"{api}/v1/oauth/clients/{client_id}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()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 | nullprivate_key_jwt: an https URL serving the client's public keys.jwksobject | nullprivate_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_detailstypes it may send. delivery_modesarray of strings- How the client learns of a decision.
notification_endpointstring | null- Ping: the notification endpoint (https).
statusenumdisabledstops the client authenticating. One ofactive,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/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "Acme Payables", "auth_method": "client_secret_basic" }),
})).json();
const clientId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients/${clientId}`, {
method: "PATCH",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "status": "disabled" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Acme Payables",
"auth_method": "client_secret_basic"
}).json()
client_id = step1["id"]
data = httpx.patch(f"{api}/v1/oauth/clients/{client_id}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"status": "disabled"
}).json()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_cursorback 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"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()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"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "Acme Payables", "auth_method": "client_secret_basic" }),
})).json();
const clientId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients/${clientId}`, {
method: "DELETE",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Acme Payables",
"auth_method": "client_secret_basic"
}).json()
client_id = step1["id"]
data = httpx.delete(f"{api}/v1/oauth/clients/{client_id}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()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"
}'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/bc_authorize`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"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"
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/oauth/bc_authorize", json={
"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"
}).json()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/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "Acme Payables", "auth_method": "client_secret_basic" }),
})).json();
const clientId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/oauth/clients/${clientId}/rotate_secret`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/oauth/clients", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Acme Payables",
"auth_method": "client_secret_basic"
}).json()
client_id = step1["id"]
data = httpx.post(f"{api}/v1/oauth/clients/{client_id}/rotate_secret", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()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"
}