Issue a personal API key for non-interactive integrations. The full plaintext token is returned exactly once and never again. A user may hold at most 5 active keys. Interactive-session only — cannot be called with an API key.
POST
/me/api-keys
curl \
--request POST 'https://api.your-domain.com/api/me/api-keys' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"CRM production","mode":"read","expires_in_days":90,"password":"S3cr3t-Passw0rd!"}'
Request examples
{
"name": "CRM production",
"mode": "read",
"expires_in_days": 90,
"password": "S3cr3t-Passw0rd!"
}
Response examples (201)
{
"code": 201,
"message": "api key created successfully",
"data": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"user_id": "jf584cz36kce",
"organization_id": "org_a1b2c3",
"name": "CRM production",
"key_public": "a1b2c3d4e5f60718293a4b5c",
"mode": "read",
"expires_at": "2026-05-04T09:42:00Z",
"last_used_at": "2026-05-04T09:42:00Z",
"last_used_ip": "string",
"revoked_at": "2026-05-04T09:42:00Z",
"created_at": "2026-05-04T09:42:00Z",
"token": "myk_a1b2c3d4e5f60718293a4b5c.0011223344556677889900aabbccddeeff00112233445566"
}
}
Response examples (400)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (409)
{
"code": 409,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "limit",
"message": "max_keys_reached"
}
]
}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}