Get key details
Your key's project, lines and limits
The first call a new integration makes: it tells you which project and lines your key reaches without sending anything to anybody. It takes no body and no query parameters, and it spends no rate-limit budget of its own.
curl https://api.mapier.ai/v1/whoami \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01"{
"projectId": "0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b",
"environment": "live",
"keyId": "0192a7b0-2d3e-7f40-9b5c-6d7e8f9a0b1c",
"key": {
"id": "0192a7b0-2d3e-7f40-9b5c-6d7e8f9a0b1c",
"scopes": ["messages:send", "messages:read"]
},
"lines": [
{
"id": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"channel": "imessage",
"address": "+14155550142",
"status": "active",
"capabilities": [
"message.send.text",
"reaction.tapback",
"name_photo.share",
"typing.start",
"message.read",
"message.edit",
"message.unsend",
"handle_check",
"receipts",
"events.delivered",
"events.read"
],
"mode": null,
"contactsAssigned": 12,
"maxContacts": 300,
"takesNewContacts": true,
"reputation": null
}
],
"limits": { "commandsPerMinute": 600 }
}The response
Prop
Type
lines[] item
Prop
Type
limits
Prop
Type
Feature-detect on capabilities
A command type the API documents is one Mapier knows, not one this line
can carry. lines[].capabilities is the list to branch on: read it once at
start-up, and again after a line changes, rather than trying a command to find
out. A command type the line's channel never carries is refused before
anything is queued (404 unsupported_command, details.reason: "not_on_channel"). One the channel carries and this line cannot is refused the
same way with details.reason: "not_on_line"; on an iMessage line it is
accepted and ends failed on the stream. See
Channel support.
lines excludes released lines: a released line has been retired from the
project and cannot carry a message. A paused line is listed, and sends
through it are refused until it is resumed.
Room for new people
Each line can hold a fixed number of contacts. contactsAssigned is how many
it has and maxContacts is how many it can hold. takesNewContacts puts the
rest together: it is true only when the line is active, its connection is not
down, and it is still below maxContacts.
A full line still carries messages for the people already on it, and Mapier
sends no first message to somebody new from it. It does not turn
anybody away: a person who texts a full line first is pinned to it and counted
anyway, so contactsAssigned can read past maxContacts. Somebody already
pinned to another of your lines who writes to this one first stays pinned where
they are, and is counted here too.
To ask which line somebody new would get, call
GET /v1/lines/available. See
Lines.
How each line is doing
lines[].reputation is each line's latest health reading in a word:
HEALTHY, AT_RISK, CRITICAL or FLAGGED, with its confidence and when it
was computed. It is null on a line that has not been read yet; a reading is taken about every 15 minutes. For every measure beside
its limit, and what to do about it, call
GET /v1/lines/{lineId}/health.
The command ceiling
limits.commandsPerMinute is your project's command budget: one budget shared
by every key of the project. Read it rather than hard-coding a figure: it is
your project's own ceiling when Mapier has set one, and the default otherwise. See
Rate limits.
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_credentials | No key, or one that is unknown, revoked or expired |
409 | project_archived | The project is archived |
422 | validation_failed | An x-mapier-version the API does not support; details.supported lists the ones it does |
429 | rate_limited | Too many failed authentications from your calling address — this route spends no budget of the key's own |
500 | internal_error | Mapier failed on its side; give requestId to support |
503 | upstream_unavailable | Mapier could not answer right now; retry with backoff |
503 | service_busy | Mapier is busy and did nothing; wait details.retryAfter seconds and call again |