Skip to content

API keys

3 calls. Every request needs the Authorization header: see the overview.

GET /users/self/api-keys

The caller’s API keys (never their secrets).

Who can call it: Admins and members, with a portal session (an API key is refused). Try it in the API playground.

Response: UserApiKey[] (200)

curl -X GET "https://api.maitento.com/users/self/api-keys" \
-H "Authorization: $MAITENTO_AUTH"
POST /users/self/api-keys

Creates an API key. The secret is in the response and never shown again. NOTE: id in the response is the KEY’s id; authenticate with your USER id (users.self()): "<userId>:<secret>".

Who can call it: Admins and members, with a portal session (an API key is refused). Try it in the API playground.

Request body: UserApiKeyCreateRequest

FieldTypeRequiredDescription
namestringyesA name for the key, 5 to 100 characters, unique among your active keys.
dateExpiresdatetime | nullWhen the key stops working, in UTC; must be in the future. Null: it never expires.

Response: UserApiCreateResponse (200)

curl -X POST "https://api.maitento.com/users/self/api-keys" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"..."}'
DELETE /users/self/api-keys/by-id/{id}

Disables an API key.

Who can call it: Admins and members, with a portal session (an API key is refused). Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/users/self/api-keys/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"