Embed Tokens

Create Embed Token Endpoint

Create an embed token scoped to a map's current layers.

The default 30-day unrestricted token is always available. Custom lifetimes and non-empty origin restrictions require advanced sharing controls.

post/maps/{map_id}/embed-tokens/

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (password, token URL /api/auth/login)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Path parameters

map_idstring uuid required

Request body

expires_in_daysinteger

Token lifetime in days (1-365). The default 30-day lifetime is always available; custom lifetimes require advanced sharing controls.

namestring nullable

Human-readable label for the token

allowed_originsstring[] nullable

Restrict embedding to these origins. Omit or null allows any origin; non-empty origin restrictions require advanced sharing controls.

Example request

{
  "expires_in_days": 90,
  "name": "Public dashboard embed",
  "allowed_origins": [
    "https://dashboard.example.com"
  ]
}

Response

Successful Response

idstring uuid required
map_idstring uuid required
namestring nullable
token_hintstring required
scoped_dataset_idsstring[] required
allowed_originsstring[] nullable
expires_atstring date-time required
is_activeboolean required
use_countinteger
last_used_atstring date-time nullable
created_atstring date-time required
raw_tokenstring required

Changes

No recorded changes to this operation across all 50 revisions of this API.