Skip to the page

API reference

Get a person’s run

One person’s run through a sequence, with a timeline of each text, wait and stop.

GET/v1/enrollments/{id}

One person’s run through a sequence, with a timeline of each text, wait and stop.

Needs a key with the messages:read scope. Keys and scopes

Path parameters

  • idstringrequired

    The run’s id.

    Starts with enr_.

Example

GET/v1/enrollments/enr_1Hq2LxW9cVbN3mKpRtYs0aGet a person’s run →
curl "https://usebluebot.com/api/v1/enrollments/enr_1Hq2LxW9cVbN3mKpRtYs0a" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY"

Response

200: The run, with its timeline.

  • idstringrequired

    A enr_ id.

    Starts with enr_.

  • object"enrollment"required
  • sequence_idstringrequired

    A seq_ id.

    Starts with seq_.

  • contact_idstringrequired

    A ct_ id.

    Starts with ct_.

  • handlestringrequired

    A phone number in E.164 (+15555550123) or an email address an Apple ID uses (iMessage only).

  • statestringrequired

    One of active, completed, stopped, canceled.

  • current_stepintegerrequired

    The position of the next step.

  • next_run_attimestamp or nullrequired

    When the next step happens, while active.

  • stop_reasonstring or nullrequired

    Why it ended early, when it did.

    One of replied, stopped, canceled, sequence_archived, failed.

  • enrolled_viastringrequired

    One of dashboard, api, zapier, make, n8n, pipedream, cli, hook, keyword, mcp, assistant, widget.

  • variablesmap of stringrequired

    Values for the steps’ {{variables}}.

  • enrolled_attimestamprequired

    When the person was added.

  • completed_attimestamp or nullrequired

    When it ended, by finishing or stopping.

  • timelinearray of object

    What happened, oldest first. Only on GET /v1/enrollments/{id}.

    Show its 6 fields
    • typestringrequired

      One of enrolled, text_queued, text_skipped, waiting, window, stopped, completed, canceled.

    • positioninteger or nullrequired

      The step it is about.

    • message_idstring or nullrequired

      A msg_ id.

      Starts with msg_.

    • untiltimestamp or nullrequired

      For a wait, when it ends.

    • detailstring or nullrequired

      What happened, in words.

    • attimestamprequired

      When.

Response200
{
  "id": "enr_1Hq2LxW9cVbN3mKpRtYs0a",
  "object": "enrollment",
  "sequence_id": "seq_1Hq2LxW9cVbN3mKpRtYs0a",
  "contact_id": "ct_1Hq2LxW9cVbN3mKpRtYs0a",
  "handle": "+15555550123",
  "state": "active",
  "current_step": 2,
  "next_run_at": "2026-11-15T19:41:00.000Z",
  "stop_reason": null,
  "enrolled_via": "api",
  "variables": {
    "listing": "412 Oak St"
  },
  "enrolled_at": "2026-11-13T19:41:00.000Z",
  "completed_at": null,
  "timeline": [
    {
      "type": "enrolled",
      "position": null,
      "message_id": null,
      "until": null,
      "detail": "Added through the API.",
      "at": "2026-11-13T19:41:00.000Z"
    },
    {
      "type": "text_queued",
      "position": 0,
      "message_id": "msg_1Hq2LxW9cVbN3mKpRtYs0a",
      "until": null,
      "detail": null,
      "at": "2026-11-13T19:41:00.000Z"
    },
    {
      "type": "waiting",
      "position": 1,
      "message_id": null,
      "until": "2026-11-15T19:41:00.000Z",
      "detail": "Waits 2 days.",
      "at": "2026-11-13T19:41:00.000Z"
    }
  ]
}

Errors

Every refusal has the same envelope and a page of its own. These are the ones this operation can give.

CodeStatusWhat it means
unauthorized401The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.
insufficient_scope403The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope.
rate_limited429Too many requests. A key may make 120 requests a minute. The RateLimit header says how many are left, and Retry-After how long to wait.
internal500Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe.
not_found404There is no such thing on this account. Ids are prefixed by kind, so a message id starts with msg_.

Try it

Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.