Create API key
Create a new API key with specified permissions and metadata. The key value is returned only once for security.
AuthorizationBearer <token>
In: header
namestring
Human-readable name for the API key
Length
1 <= length
description?string
Description of the API key purpose
rolestring
Role/permissions for this API key
Value in
"admin" | "account_manager" | "viewer"
expires_at?string
When the API key should expire (optional)
Format
date-time
Response Body
const body = JSON.stringify({
"name": "Production Integration",
"role": "account_manager"
})
fetch("https://app.orbiqhq.com/api/v1/integrations/api-keys", {
body
})
{
"success": true,
"data": {
"apiKey": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"token": "tc_abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234",
"role": "string"
},
"createdApiKeyUserId": "44577c1f-25c1-42a5-8b6f-d0758eb4a77f"
}
}
{
"success": false,
"status": 400,
"error": "Invalid role specified: invalid_role"
}
Empty
Empty
How is this guide?