Skip to main content

Create an API key

POST 

/user/keys

Create a new API key by providing its details.

To learn how to use the token of an API key to authenticate your API requests, read the bearer tokens page.

Body

required

application/json

    handlestringrequired

    The handle of the new API key. Must be unique.

    Format: string<handle>

    Possible values: non-empty and <= 50 characters

    Example: key-a

    aliasstring | null

    The alias of the new API key.

    Format: string,null<alias>

    Possible values: non-empty and <= 100 characters

    Example: Key A

Responses​

The created API key

Response Body

application/json

    idstringrequired

    The UUID of the API key. Is unique.

    Format: string<uuid>
    Example: 00000000-0000-0000-0000-000000000000

    handlestringrequired

    The handle of the API key. Is unique.

    Format: string<handle>
    Example: key-a

    aliasstring | nullrequired

    The alias of the API key.

    Format: string,null<alias>
    Example: Key A

    suffixstringrequired

    Last 4 characters of the API key token used for identification.

    Possible values: <= 4 characters

    Example: cWTk

    tokenstringrequired

    The token of the API key. Is unique.

    Example: 53y9g8ZNronem8Mv4Aw0h0oxiUWqysmZzKX8cWTk

    createdAtstringrequired

    The date and time when the API key was created.

    Format: string<date-time>
    Example: 2023-01-01T00:00:00.000000Z

Example from Schema​

{
"id": "00000000-0000-0000-0000-000000000000",
"handle": "key-a",
"alias": "Key A",
"suffix": "cWTk",
"token": "53y9g8ZNronem8Mv4Aw0h0oxiUWqysmZzKX8cWTk",
"createdAt": "2023-01-01T00:00:00.000000Z"
}