API referenceAPI keys
Create an API key
POST
/api-keysRequires an API key with one of these roles: admin.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created in Settings → API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "role": "admin" }'{ "data": { "key": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "role": "admin", "keyPrefix": "string", "status": "active", "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "requestCount": 0, "rateLimit": 0 }, "plaintext": "string" }, "meta": { "requestId": "string", "timestamp": "string" }}