APIAuth
Create an API key
Create an API key. Returns the full token once.
POST
Create an API key. Returns the full token once.
ApiKeyAuthheader
AuthorizationBearer <token>Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.
Required permission
manage_api_keysapplication/json- body
name*stringLength
1 <= length <= 255permissions*array<>What the key may do. Every permission must be one you hold yourself.
Items
1 <= itemsexpires_at?stringFormat
date-timeThe request has succeeded and a new resource has been created as a result.
application/json- response
A key together with its secret. The secret is shown only once.
key*A credential for calling this API from your own application. The key carries its own permissions and can never do more than the person who created it.
token*stringThe full API key. Copy it now; it cannot be retrieved later.
curl -X POST "https://example.com/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "permissions": [ "view_agents" ] }'{ "key": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "permissions": [ "view_agents" ], "last_four": "string", "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }, "token": "string"}