Get a command

What happened to a command, by the id its 202 handed back

GET/v1/commands/{commandId}

What happened to a command: queued until it ends, then exactly what its command event on the stream carried, with settledAt. Read it when your integration restarted or lost the stream. A finished command is kept for 90 days. Each read counts against the project's command budget.

Example request

curl https://api.mapier.ai/v1/commands/3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71 \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "x-mapier-version: 2026-12-01"

Response

200 OK
{
  "commandId": "3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71",
  "logicalActionId": null,
  "status": "succeeded",
  "errorCode": null,
  "conversationId": "a0000000-0000-4000-8000-000000000001",
  "type": "message.send",
  "messageId": "0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99",
  "externalId": "8C2E4A61-3B7D-4F90-A1C5-6D8E0F2B4A73",
  "platformMessageId": "8C2E4A61-3B7D-4F90-A1C5-6D8E0F2B4A73",
  "namePhoto": null,
  "group": null,
  "appCard": null,
  "projectId": "0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b",
  "lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
  "environment": "live",
  "failureClass": null,
  "settledAt": "2026-10-18T18:01:03.000Z"
}

commandId is the one a 202 handed back, or a parts[].commandId of a send that went out as several messages. A command another project sent is a 404, the same answer as an id that never existed.

The body is the command event's: platformMessageId is the channel's own id for the message the command wrote, and externalId carries the same value under its older, deprecated name.

Errors

StatusCodeCause
400bad_requestWith a personal access token, no x-mapier-project header
401invalid_credentialsNo key, or one that is unknown, revoked or expired
403forbiddenA personal access token not made for this environment, or whose owner's role no longer allows this
403insufficient_scopeThe key does not carry the messages:read scope
404not_foundNo command with that id in this project
409project_archivedThe project is archived
422validation_failedAn x-mapier-version that is not a published version
429rate_limitedOver this route's budget; the Retry-After header says how long to wait
500internal_errorAn unexpected error on Mapier's side; quote the error's requestId to support
503service_busyMapier was too busy to take the request and did nothing; wait details.retryAfter seconds and call again
503upstream_unavailableA service behind Mapier did not answer; retry with backoff

Guide