Create an API key
POST /api/api-keys
Creates a new API key with the specified scopes and optional restrictions. The full key is returned only in this response — store it securely, as it cannot be retrieved later. The key follows the format ‘sf_live_v1_…’ and should be passed in the Authorization header as ‘Bearer sf_live_v1_…’.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
A human-readable name to identify this key’s purpose.
Example
CRM Integration - ProductionPermission scopes for this key. At least one scope is required.
Example
[ "conversations:read", "contacts:read", "kb:read"]Restrict this key to a specific brand. Omit for unrestricted access.
Restrict this key to a specific workspace. Omit for unrestricted access.
When the key should expire. Omit for a key that never expires.
Example
2027-01-01T00:00:00.000ZResponses
Section titled “ Responses ”The API key was created. The response includes the full key — this is the only time it will be available.
Response returned when a new API key is created. This is the only time the full key value is available — store it securely, as it cannot be retrieved later.
object
Unique identifier for the new API key.
Example
ak1a2b3c-5678-9abc-def0-1234567890abThe name assigned to the key.
Example
CRM Integration - ProductionThe prefix portion of the key for future identification.
Example
sf_live_v1_a3BfThe full API key. This is only returned once at creation time. Store it in a secure location — it cannot be retrieved again. Use this value in the Authorization header as ‘Bearer sf_live_v1_…’.
Example
sf_live_v1_a3BfX9kLmN2pQrStUvWxYz...Permission scopes granted to this key.
Example
[ "conversations:read", "contacts:read"]Timestamp when the key was created.
Example
2026-03-27T12:00:00.000ZValidation error. For example, no scopes were provided or the name is too long.
Standard error response returned by all endpoints on failure.
object
A human-readable error message describing what went wrong.
Example
Conversation not found