Skip to main content

Authentication

Every API call is signed with an API key, sent in the Authorization header.

The header​

Put your secret key after the word Bearer:

GET /v2/{team_id}/project/{project_id}/upload/{upload_id} HTTP/1.1
Host: api.send.ai
Authorization: Bearer <your secret key>

The key must be linked to the project in the URL, and its scopes must allow the call. See API keys and scopes.

When a key is refused​

A refused key gets one of these answers:

StatusMessageCause
400Please use the correct header formatThe Authorization header is missing or has no Bearer.
403API key does not exist or is currently disabledThe key was deleted or disabled.
403Invalid credentialsThe secret is wrong.
401Project with id '…' does not exist or the API Key does not have access to this projectThe key is not linked to the project.
403User has no permission to perform this actionThe key lacks the scope for this call.

Uploads answer in a shorter form, such as {"error":"unauthorized API KEY"}. See Errors.

Changes take a moment​

Linking or unlinking a key, or disabling it, can take about 15 seconds to reach the upload endpoint.

Keeping keys safe​

The secret key gives access to your projects, so keep it on your server. Do not put it in a website or an app that others can open; browsers cannot call the API anyway.