Get a setup
A line setup as it stands: its state, its checks, and the next step
GET/v1/line-setups/{setupId}
The setup as it stands: its state, its checks, the step a person must take
next, and the line it bound. verified means the line is added and takes new
contacts; failed names its reason in failureReason. handoffUrl
is always null here: it appears only in the response that created the setup.
Example request
curl https://api.mapier.ai/v1/line-setups/0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405 \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01"Response
{
"id": "0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405",
"channel": "imessage",
"method": "operator",
"purpose": "connect",
"state": "verifying",
"checks": {
"credentials": {
"state": "pending",
"detail": "Mapier is attaching a number.",
"reason": null,
"retryable": true,
"checkedAt": null,
"docUrl": "https://docs.mapier.ai/convo/guides/connect/imessage#request-a-line",
"fixUrl": null,
"sub": null
},
"webhook": {
"state": "pending",
"detail": "Waiting for the line to connect.",
"reason": null,
"retryable": true,
"checkedAt": null,
"docUrl": "https://docs.mapier.ai/convo/guides/connect/imessage#request-a-line",
"fixUrl": null,
"sub": null
},
"platform_approval": {
"state": "n/a",
"detail": "Not needed.",
"reason": null,
"retryable": false,
"checkedAt": null,
"docUrl": null,
"fixUrl": null,
"sub": null
},
"policy_ack": {
"state": "n/a",
"detail": "Not needed.",
"reason": null,
"retryable": false,
"checkedAt": null,
"docUrl": null,
"fixUrl": null,
"sub": null
},
"inbound_proof": {
"state": "n/a",
"detail": "Not needed.",
"reason": null,
"retryable": false,
"checkedAt": null,
"docUrl": null,
"fixUrl": null,
"sub": null
},
"outbound_proof": {
"state": "n/a",
"detail": "Not needed.",
"reason": null,
"retryable": false,
"checkedAt": null,
"docUrl": null,
"fixUrl": null,
"sub": null
}
},
"nextStep": {
"kind": "wait",
"reason": "operator_attaching",
"etaSeconds": null
},
"handoffUrl": null,
"handoffExpiresAt": null,
"identity": null,
"lineId": null,
"number": null,
"failureReason": null,
"createdAt": "2026-10-18T17:02:11.000Z",
"updatedAt": "2026-10-18T17:02:11.000Z",
"expiresAt": null
}Poll it within this route's budget, or take the
line.setup_changed webhook instead.
What each state means and what each nextStep asks of a person are in
What happens next. From ready on,
lineId is the line the setup bound, as GET /v1/whoami lists
it; the line takes new contacts once state is verified.
Errors
| Status | Code | Cause |
|---|---|---|
400 | bad_request | With a personal access token, no x-mapier-project header |
401 | invalid_credentials | No key, or one that is unknown, revoked or expired |
403 | forbidden | A personal access token not made for this environment, or whose owner's role no longer allows this |
403 | insufficient_scope | The key does not carry the lines:write scope |
404 | not_found | A setup this key cannot see, or none |
409 | project_archived | The project is archived |
422 | validation_failed | An x-mapier-version the API does not support |
429 | rate_limited | Over this route's budget; the Retry-After header says how long to wait |
500 | internal_error | Mapier failed on its side; give requestId to support |
503 | service_busy | Mapier is busy and did nothing; wait details.retryAfter seconds and call again |
503 | upstream_unavailable | Mapier could not answer right now; retry with backoff |