POST/api/v1/me/tokens

Create an API token

Creates an API token (mdk_…). It is shown only in this response.

API token required20 per hour per IP

Guide: API tokens

Code samples and Try it

Request body

#

application/json, required

  • namestring

    A name to recognise it by, like the script or device that uses it. Up to 80 characters. Default "API token".

Responses

#
  • 200OK.
  • 401No token, or the token is revoked or mistyped.
  • 422The request didn't validate. detail lists each problem, with where it is (loc) and why (msg).
  • 429Too many requests from your IP address. Wait the seconds in Retry-After.
200 response: 6 fields (ApiTokenCreateResponse)
  • idstring
  • namestring
  • prefixstring
  • created_atstring (date-time)

    ISO 8601, for example 2026-11-30T12:00:00Z.

  • last_used_atstring (date-time) | null

    ISO 8601, for example 2026-11-30T12:00:00Z.

  • tokenstring

    The token. Shown only in this response: store it now.

Did this page help?