API referenceAuth
Create User Key
Needs a login session: an API key never issues keys, so a leaked key cannot outlive its revocation.
POST
/api/v1/users/me/keysNeeds a login session: an API key never issues keys, so a leaked key cannot outlive its revocation.
AuthorizationBearer <token>
A workspace API key (a13n_...)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/users/me/keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "workspace_id": "string" }'{ "key": { "created_at": "2019-08-24T14:15:22Z", "created_by_id": "string", "expires_at": "2019-08-24T14:15:22Z", "id": "string", "last_used_at": "2019-08-24T14:15:22Z", "name": "string", "organization_id": "string", "principal": { "email": "string", "id": "string", "image_url": "string", "kind": "string", "name": "string", "status": "string" }, "revoked_at": "2019-08-24T14:15:22Z", "version": 0, "workspace_id": "string" }, "secret": "string"}