Atasu Maps

Map sessions & styles

Map session, tile token and style JSON. Tile token format is in the `TileToken` security scheme.

← All operations

POST/v1/map-sessionsAvailable

Start a map session and get a tile token

Host
https://api.atasumaps.com · createMapSession
Access
API key with scope: basemap
Metering
map_session (per session)
Idempotency-Key
Required: one key per command; a retry returns the first result

Called by the SDK before the map is created. Creates a server-generated session_id (ends after 30 minutes without a token refresh or style request) and a 1-hour tile token whose scp is the intersection of the key's effective scopes (key ∩ plan) and the tile products (basemap, overlay, traffic). A free key's token never carries traffic. Counted as one map session; style requests and token refreshes in the same session are not counted again.

The SDK refreshes the token at refresh_after (20 minutes after issue) while the map is in use, which also keeps the session alive; a map left alone for 30 minutes ends its session and the next refresh answers 410 session_expired. The token carries the session id (sid). A replay with the same Idempotency-Key from the same key returns the same session (not counted again) with a freshly minted token. Key restrictions (Origin / package / egress IP) apply.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringyesClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Request body MapSessionCreate

NameTypeRequiredDescription
styleStyleId
platform"web" | "android" | "ios" | "flutter" | "react-native"
sdk_versionstring

Responses

StatusDescriptionType
201Session startedMapSession
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Dependency down (routing_unavailable, search_unavailable, budget_unavailable, traffic_unavailable, auth_unavailable, db_unavailable, tiles_unavailable)Problem
POST/v1/map-sessions/{session_id}/tokensAvailable

Refresh the tile token of a live session

Host
https://api.atasumaps.com · refreshTileToken
Access
API key with scope: basemap
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

The SDK calls this at refresh_after (and before expires_at). Keeps the session alive. Returns 410 session_expired after 30 minutes of inactivity (or for an unknown session id); the SDK then starts a new session. A session belongs to the API key that created it: any other key gets 404. Tokens are signed with the current kid; old tokens stay valid until their own exp unless the key is revoked or its scopes / restrictions change (the tile edge then answers 401 key_revoked / 401 token_expired within 1 minute). A refresh changes nothing but the session's last activity, so a replay with the same Idempotency-Key simply mints another token.

Parameters

NameInTypeRequiredDescription
session_idpathstringyes
Idempotency-KeyheaderstringyesClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Responses

StatusDescriptionType
200New tokenTileTokenGrant
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
404No such resource, or not visible to the caller (not_found)Problem
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.Problem
410No longer available (place_removed, session_expired, invitation_expired)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Dependency down (routing_unavailable, search_unavailable, budget_unavailable, traffic_unavailable, auth_unavailable, db_unavailable, tiles_unavailable)Problem
GET/v1/styles/{style_id}.jsonAvailable

MapLibre style JSON

Host
https://api.atasumaps.com · getStyle
Access
API key with scope: basemap
Metering
Not metered

P2's generated style. Language and theme are root-level state (lang, theme) switched on the client without reloading, so they are not parameters here. Tile URLs inside the style carry no token: the Web SDK adds t= in transformRequest, native SDKs add X-Atasu-Token only for exact atasumaps.com hosts. The key may be passed as ?key= because MapLibre fetches the style itself (web keys are public and origin-restricted).

Served from the built P2 styles (standard; standard-3d and navigation answer 404 until they are built). session must be a live session of the same key (410 session_expired otherwise); the request counts as activity in that session.

Parameters

NameInTypeRequiredDescription
style_idpathStyleIdyes
sessionquerystringyessession_id from createMapSession. The style request counts within that session, not as a new one.

Responses

StatusDescriptionType
200Style document (MapLibre style spec v8)StyleDocument
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
404No such resource, or not visible to the caller (not_found)Problem
410No longer available (place_removed, session_expired, invitation_expired)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Dependency down (routing_unavailable, search_unavailable, budget_unavailable, traffic_unavailable, auth_unavailable, db_unavailable, tiles_unavailable)Problem