Skip to content

Create API client

POST/api/v1/api-clients

Register a partner API client with its public keys (JWK set). Requires the two-factor step-up; refused for API tokens.

Operation ID: create_api_client·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

namestringrequired

Client name

descriptionstring
scopesarray · string

What every token issued to this client may do. Same vocabulary as API tokens: credit, credit:read, credit:payments, read_only, api (full access).

allowed_ipsarray · string

IPv4/IPv6 addresses or CIDR ranges the client may request tokens from and use them from. Omit for any IP.

rate_limit_per_minuteinteger

Requests per minute each issued token may make; omit for the platform default.

token_ttl_secondsinteger

Lifetime of each access token, in seconds (60-3600).

jwksobjectrequired

JWK set ({"keys": [...]}) with the public keys the client signs its assertions with: RS256 (RSA >= 2048 bits), ES256 (P-256) or EdDSA (Ed25519). Public members only; every key needs a kid when there is more than one.

require_mtlsboolean

Bind every token to the client certificate presented at the token endpoint (RFC 8705). Only available where the load balancer forwards client certificates (mtls_available).

mtls_cert_thumbprintsarray · string

Optional pin list of SHA-256 certificate thumbprints (hex or base64url). Empty: any certificate the load balancer accepted.

require_signed_requestsboolean

Payment requests must also carry a signature from a signing key.

Responses

201Successful Response

successboolean
messagestring
codestring
dataApiClientResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

429Too Many Requests - Rate limit exceeded; back off and retry

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.