Skip to main content

Update an API key

PATCH 

/user/keys/{key}

Update an API key by providing its new details.

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

Path Parameters​


    key string<handle>required

    The handle of the API key.

    Possible values: non-empty and <= 50 characters

Body

required

application/json

    handlestring

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

    Format: string<handle>

    Possible values: non-empty and <= 50 characters

    Example: key-a

    aliasstring | null

    The new alias of the organization.

    Format: string,null<alias>

    Possible values: non-empty and <= 100 characters

    Example: Key A

Responses​

The updated 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

    tokenstringdeprecated

    The token of the API key. This field is deprecated on non POST responses.

    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",
"createdAt": "2023-01-01T00:00:00.000000Z"
}