API Key Management

List API Keys for your User

Example cURL Request

curl --request GET 'https://${BASE_URL}/api/api-keys' \
--header 'Authorization: Bearer ${API_KEY}'

Endpoint Specification

Get your user

GET /api/api-keys

Get all of the API keys for your user

Headers

{
    "api_keys": [
        {
            "id": "00n06yx75dzuxz2lgi",
            "name": "default api key",
            "created_at": "2023-06-09T06:34:37.685Z",
            "is_active": true
        }
    ]
}

Create an API Key

You are allowed to have 2 active API keys per user at any one time

Example cURL Request

curl --request POST 'https://${BASE_URL}/api/api-keys' \
--header 'Authorization: Bearer ${API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "new api key",
    "deactivate_current": false
}'

Endpoint Specification

Create a new API key

POST /api/api-keys

Create a new API key and optionally deactivate the API key used to authenticate this request

Headers

Request Body

{
    "api_key": "18077981128785C05993E9C685FD52410BADCD994B3C1D0365A0C7088BA5BAC1"
}

422: Unprocessable Entity error types

Deactivate an API Key

It is possible to deactivate the key you use to authenticate the request to deactivate. This is for security purposes should your key be compromised. Be aware that if you deactivate your last key you will need to contact support@thallo.io to request a new one.

Example cURL Request

curl --request DELETE 'https://${BASE_URL}/api/api-keys/${API_KEY_ID}' \
--header 'Authorization: Bearer ${API_KEY}'

Endpoint Specification

Deactivate an API key

DELETE /api/api-keys/${API_KEY_ID}

Deactivate an API key by its id

Path Parameters

Headers

422: Unprocessable Entity error types

Last updated