Create an access key
A key for one client of the access, returned ONCE in secret (ak_live_…): only its hash is kept. The client sends it as Authorization: Bearer ak_live_…. It opens this access and nothing else; the workspace API refuses it. Optional daily_credits and monthly_credits cap this key inside the access's own ceilings. Pro plan.
POST/v1/accesses/{access_id}/keys
Authorizations
Authorizationbearerin headerrequiredPath parameters
access_idstringrequiredHeader parameters
Idempotency-Keystringlength: 1–255 charsA unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.
Body
application/jsonrequirednamestringrequiredlength: 1–100 charsWho it is for, e.g. the client's name.
daily_creditsinteger | nullCredits this key, per UTC day, inside the access's own ceilings, may spend; null is no ceiling. A call whose price does not fit is refused with rate_limited until the window resets.
monthly_creditsinteger | nullCredits this key, per UTC month, inside the access's own ceilings, may spend; null is no ceiling. A call whose price does not fit is refused with rate_limited until the window resets.
Response
Create an access key
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, permission_denied
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, assistant_has_no_resources
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired