Skip to content
Documentation menu
docs / api / post-v1-keys-self-verify
Keys and account

POST/v1/keys/self/verify

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Not metered: it draws no quota and no credit. Needs a full key; a browser (maps) key is refused.
PriceNot metered: no quota, no credit.

What it does

The code is bound to the key it was mailed for: a code from key A never confirms key B. It lasts identity::KEY_CODE_TTL_MIN minutes, works once, and dies after identity::MAX_KEY_CODE_ATTEMPTS wrong guesses. Every attempt, right or wrong, spends a per-key, per-IP and per-address daily budget (the address's is skipped on the owner's own network) and, while a code is out, a global hourly ceiling. A key that is already verified (its link was clicked first) still accepts its live code once: the answer is the same verified, with a session.

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/v1/keys/self/verify" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"string"}'

Request body

application/json · ConfirmKeyCodeRequest

FieldTypeRequiredDescription
codestringyesThe 6-digit code from the verification mail.

Example: A request assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "code": "string"
}

Responses

200This key is verified (now, or already). Only the address's sole live key, on an address with no account, is confirmed by code; session then signs it in to the console (signed_in: true, absent without a console)
FieldTypeRequiredDescription
emailstringyesThe address of the account: the caller has just proved it reads this mailbox.
monthly_quotaintegeryesRequests allowed per calendar month from now on (a plan bought before confirming is honoured, not the free tier).
sessionstringnoA console session for that account (sns_…), as POST /v1/console/session mints from an emailed sign-in link. The website stores it in an httpOnly cookie on its own origin; it is never an API credential. Absent when the deployment has no console (SN_CONSOLE_URL unset).
session_expires_atstringnoRFC 3339 expiry of session.
signed_inbooleanyestrue when session was minted; false only when the deployment has no console (the key is still confirmed).
statestringyesAlways verified.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "email": "string",
  "monthly_quota": 0,
  "signed_in": false,
  "state": "string"
}
400verify-code: the code is not accepted. reason is wrong (with attempts_left), locked (too many wrong tries: send a new code), expired (expired, used, replaced or never sent) or, after a right code only, use-link (an existing account, or another live key on the address: confirm with the link)

application/problem+json · Problem

401Missing, unknown, revoked or expired key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized)

application/problem+json · Problem

409The account already has five verified keys; revoke one first. The code stays usable

application/problem+json · Problem

413The request declares a body larger than 1048576 bytes (plain text, not problem+json)

text/plain

429Per-key, per-IP or per-address daily attempt limit, the hourly ceiling, or the key's per-minute rate limit

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Keys and account

Generated from https://api.mapmap.ai/openapi.json on 2026-11-06 · operationId confirm_key_code