GET /v1/whoami

What the key you call it with is — its project, its environment, the lines it can send from, and the command ceiling it spends.

GET /v1/whoami

The first call a new integration makes, and the one that answers "did I paste the live key or the test one?" 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-10-15"
200 OK
{
  "projectId": "0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b",
  "environment": "test",
  "keyId": "0192a7b0-2d3e-7f40-9b5c-6d7e8f9a0b1c",
  "lines": [
    {
      "id": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
      "channel": "imessage",
      "address": "+19995550142",
      "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 the platform 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 accepted and settles failed on the stream. See Capabilities.

A test line lists what the sandbox performs, which can be less than a live line of the same channel lists: a command its channel carries and the sandbox does not is still accepted, and settles failed with unsupported_capability. A command done in a group chat is the exception, because a test line has no group chat: a well-formed group.update or group.leave there is 422 validation_failed at target.conversationId. Read a live key's list before switching a feature off.

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 the platform 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 Projects with several lines.

How each line is doing

lines[].reputation is each line's latest reputation reading in a word: HEALTHY, AT_RISK, CRITICAL or FLAGGED, with its confidence and when it was computed. It is null on a test line and on a live 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}/reputation.

The command ceiling

limits.commandsPerMinute is the ceiling your key's project spends in your key's environment: one budget for every key of the project, and one each for live and test. Read it rather than hard-coding a figure — it is your project's own ceiling when Mapier has set one, and the platform default otherwise. See Rate limits.

Errors

StatusCodeCause
401invalid_credentialsNo key, or one that is unknown, revoked or expired
409project_archivedThe project is archived
422validation_failedAn x-mapier-version this build does not answer to; details lists the ones it does in supported
429rate_limitedToo many failed authentications from your calling address — this route spends no budget of the key's own
500internal_errorAn unhandled failure, reported; details.requestId names the log line when present
503upstream_unavailableThe service could not answer right now
503service_busyThe platform had no database connection free in time and did nothing; wait details.retryAfter seconds and ask again

On this page