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
requiredhandlestringrequired
The handle of the new API key. Must be unique.
Format:
string<handle>Possible values: non-empty and <= 50 characters
Example:
key-aaliasstring | null
The alias of the new API key.
Format:
string,null<alias>Possible values: non-empty and <= 100 characters
Example:
Key AResponses
- 201
- 404
- 409
The created API key
Response Body
idstringrequired
The UUID of the API key. Is unique.
Format:
string<uuid>Example:
00000000-0000-0000-0000-000000000000handlestringrequired
The handle of the API key. Is unique.
Format:
string<handle>Example:
key-aaliasstring | nullrequired
The alias of the API key.
Format:
string,null<alias>Example:
Key Asuffixstringrequired
Last 4 characters of the API key token used for identification.
Possible values: <= 4 characters
Example:
cWTktokenstringrequired
The token of the API key. Is unique.
Example:
53y9g8ZNronem8Mv4Aw0h0oxiUWqysmZzKX8cWTkcreatedAtstringrequired
The date and time when the API key was created.
Format:
string<date-time>Example:
2023-01-01T00:00:00.000000ZExample 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"
}
Resource not found
Response Body
messagestringrequired
The message of the error.
Example:
this is an error messageExample from Schema
{
"message": "this is an error message"
}
Resource collision
Response Body
messagestringrequired
The message of the error.
Example:
this is an error messageExample from Schema
{
"message": "this is an error message"
}