Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

Personal API key (mkx_...) created from the MapX account.

Body

application/json

API key configuration. The raw key is returned only once; store it immediately.

name
string
required

API key display name (1-64 characters).

Required string length: 1 - 64
expiresAt
string<date-time> | null

ISO 8601 expiry timestamp. Omitted or null means the key never expires.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
scopes
string[]

Capability scopes. Empty array or ["*"] grants all access. Allowed values: session, chat, files, layers, map, reports, remote, keys.

Response

API key created with the raw key.

id
string
required

API key id.

name
string
required

Display name.

prefix
string
required

Key prefix (first 8 characters of mkx_...).

scopes
string[]
required

Granted scopes; ["*"] means all access.

enabled
boolean
required

Whether the key is active.

createdAt
string<date-time>
required

Creation time.

key
string
required

Raw API key (mkx_...). Only returned once at creation; store it immediately.

expiresAt
string<date-time> | null

Expiry time; null means never expires.