Skip to content

Retrieve a sequence test

GET/v1/sequences/{id}/tests/{testId}

Retrieves the result of a test started with Start a sequence test: its status, and for every step of the tested version whether it composed a message, was skipped or failed. Poll it until status is COMPLETED or FAILED.

An email step’s message is its subject and a markdown body, and a LinkedIn step’s message is its text. A step that failed carries the reason under error; a template step whose variable could not be filled for the contact fails this way, naming the fields. Steps that have not run are PENDING, including a step a finished test never reached; a step that produced nothing is SKIPPED. A test never waits, so a wait is always SKIPPED; a send step is SKIPPED when it has nothing to send, such as a LinkedIn invite another step already sent. A test never sends anything.

Returns 404 for a test that does not exist, belongs to another sequence, or is a live enrollment: use Retrieve a sequence enrollment for those.

Required scope: sequences:read

Rate limit category: Read

Path ParametersExpand Collapse
id: string

Unique identifier of the sequence.

testId: string

The id returned when the test was started.

ReturnsExpand Collapse
SequenceRetrieveTestResponse object { id, contactId, status, 2 more }
id: string

ID of the test, an enrollment ID.

contactId: string

ID of the contact tested.

status: "RUNNING" or "COMPLETED" or "FAILED"

RUNNING until every step has finished, then COMPLETED, or FAILED when the test ended on a failure.

One of the following:
"RUNNING"
"COMPLETED"
"FAILED"
steps: array of object { error, message, mode, 4 more }

Every step of the tested version that the Sequences API lists, in run order. Call steps are not part of the API yet, so a test reports nothing for them.

error: object { code, message }

Why the step failed; null unless outcome is FAILED.

code: "CONFIGURATION_ERROR" or "SYSTEM_ERROR"

CONFIGURATION_ERROR when the sequence or the contact needs a change, SYSTEM_ERROR when Lightfield failed.

One of the following:
"CONFIGURATION_ERROR"
"SYSTEM_ERROR"
message: string

What went wrong, in plain words.

message: object { body, subject } or object { body }

The composed message; null when the step has not composed one.

One of the following:
EmailMessage object { body, subject }
body: string

Body as markdown, the same form a template step reads back in.

subject: string

Subject line, as composed.

LinkedInMessage object { body }
body: string

Message text, as composed.

mode: "AGENT" or "TEMPLATE"

How a send step’s content is composed; null for a wait step.

One of the following:
"AGENT"
"TEMPLATE"
name: string

Name of the step, as in definition.steps; null for a wait step.

outcome: "PENDING" or "COMPOSED" or "SKIPPED" or "FAILED"

PENDING while the step has not run, including a step a finished test never reached, COMPOSED when it produced a message, SKIPPED when it produced nothing: a test never waits, so a wait is always SKIPPED, and a send step is SKIPPED when it has nothing to send, such as a LinkedIn invite another step already sent. FAILED when it failed: see error.

One of the following:
"PENDING"
"COMPOSED"
"SKIPPED"
"FAILED"
stepId: string

ID of the step, as in the sequence’s definition.steps.

type: "EMAIL" or "LINKEDIN_MESSAGE" or "LINKEDIN_INVITE" or 2 more

Step type.

One of the following:
"EMAIL"
"LINKEDIN_MESSAGE"
"LINKEDIN_INVITE"
"WAIT"
"WAIT_FOR_CONNECTION"
target: "DRAFT" or "PUBLISHED"

Which version was tested.

One of the following:
"DRAFT"
"PUBLISHED"

Retrieve a sequence test

curl https://api.lightfield.app/v1/sequences/$ID/tests/$TEST_ID \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
{
  "id": "id",
  "contactId": "contactId",
  "status": "RUNNING",
  "steps": [
    {
      "error": {
        "code": "CONFIGURATION_ERROR",
        "message": "message"
      },
      "message": {
        "body": "body",
        "subject": "subject"
      },
      "mode": "AGENT",
      "name": "name",
      "outcome": "PENDING",
      "stepId": "stepId",
      "type": "EMAIL"
    }
  ],
  "target": "DRAFT"
}
Returns Examples
{
  "id": "id",
  "contactId": "contactId",
  "status": "RUNNING",
  "steps": [
    {
      "error": {
        "code": "CONFIGURATION_ERROR",
        "message": "message"
      },
      "message": {
        "body": "body",
        "subject": "subject"
      },
      "mode": "AGENT",
      "name": "name",
      "outcome": "PENDING",
      "stepId": "stepId",
      "type": "EMAIL"
    }
  ],
  "target": "DRAFT"
}