OverviewPlatformsAPI Reference
API Keys

Create an API key

Issues a new API key in this workspace. The key is shown only in this response, and only its hash is stored. expiresAt makes it stop working at a set time, useful for a contractor or a one-off script. An expired key stays in the list until you revoke it.


POST
/v1/api-keys

Authorization

bearerAuth
AuthorizationBearer <token>

An API key from POST /v1/api-keys. Keys start with ref_.

In: header

Request Body

application/json

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/api-keys" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "prefix": "string",  "scope": "read",  "createdAt": "string",  "lastUsedAt": "string",  "expiresAt": "string",  "key": "string"}
Was this page helpful?