Skip to content
Get Started

Get line state snapshot

GET/api/v2/lines/state

Returns the authenticated account’s current line membership and latest persisted health transition.

ReturnsExpand Collapse
data: array of LineState { assignment, sendblue_number, status, 4 more }
assignment: "assigned" or "shared" or "grace_period"
One of the following:
"assigned"
"shared"
"grace_period"
sendblue_number: string
status: "ONLINE" or "OFFLINE" or "DEGRADED" or "UNKNOWN"
One of the following:
"ONLINE"
"OFFLINE"
"DEGRADED"
"UNKNOWN"
worker_id: string
degraded_since: optional string
effective_until: optional string
status_changed_at: optional string
snapshot_at: string
status: "OK"

Get line state snapshot

curl https://api.sendblue.co/api/v2/lines/state \
    -H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
    -H "sb-api-secret-key: $SENDBLUE_API_API_SECRET"
{
  "data": [
    {
      "assignment": "assigned",
      "sendblue_number": "sendblue_number",
      "status": "ONLINE",
      "worker_id": "worker_id",
      "degraded_since": "2019-12-27T18:11:19.117Z",
      "effective_until": "2019-12-27T18:11:19.117Z",
      "status_changed_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "snapshot_at": "2019-12-27T18:11:19.117Z",
  "status": "OK"
}
Returns Examples
{
  "data": [
    {
      "assignment": "assigned",
      "sendblue_number": "sendblue_number",
      "status": "ONLINE",
      "worker_id": "worker_id",
      "degraded_since": "2019-12-27T18:11:19.117Z",
      "effective_until": "2019-12-27T18:11:19.117Z",
      "status_changed_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "snapshot_at": "2019-12-27T18:11:19.117Z",
  "status": "OK"
}