Create a management key
Requires keys:write. Requested scopes must be a subset of both the caller's key scopes and current role permissions. Members create their own keys. Billing-only members cannot manage keys. Store the returned secret securely; subsequent list operations cannot retrieve it.
Endpoint playground
Targets https://berrybox.io. Hosted availability is pending. Use a disposable key; this form keeps credentials only until you leave this endpoint or select Clear.
Requires keys:write. Requested scopes must be a subset of both the caller's key scopes and current role permissions. Members create their own keys. Billing-only members cannot manage keys. Store the returned secret securely; subsequent list operations cannot retrieve it.
Authorization
ManagementKey A team-bound management key with the endpoint's required scope. Dashboard cookies, sandbox keys, and OIDC tokens are not accepted.
In: header
Header Parameters
Optional team-scoped mutation key, bound to the caller and request. A conflicting or in-progress request returns 409. Completed create and rotate requests also return 409 on replay; their secrets are never stored for replay. Completed revocation requests can replay their result.
^[!-~]{1,128}$1 <= length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
length <= 120"API key"60 <= value <= 259200086400When omitted, the service grants the permitted subset of teams:read and ci:read. Current membership and role still apply.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/management/v1/api-keys" \ -H "Content-Type: application/json" \ -d '{}'{ "ok": true, "type": "api_key.created", "apiKey": { "id": "string", "name": "string", "keyPrefix": "string", "keyLastFour": "string", "scopes": [ "teams:read" ], "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z" }, "secret": "string"}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}{ "ok": false, "type": "management.error", "status": 0, "code": "string", "message": "string", "requestId": "string", "error": { "code": "string", "message": "string", "status": 0, "details": null }}