## Retrieve a sequence test

**get** `/v1/sequences/{id}/tests/{testId}`

Retrieves the result of a test started with [Start a sequence test](/api/resources/sequence/methods/startTest): 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](/api/resources/sequence/methods/retrieveEnrollment) for those.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Path Parameters

- `id: string`

  Unique identifier of the sequence.

- `testId: string`

  The `id` returned when the test was started.

### Returns

- `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.

    - `"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.

        - `"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.

      - `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.

      - `"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`.

      - `"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.

      - `"EMAIL"`

      - `"LINKEDIN_MESSAGE"`

      - `"LINKEDIN_INVITE"`

      - `"WAIT"`

      - `"WAIT_FOR_CONNECTION"`

  - `target: "DRAFT" or "PUBLISHED"`

    Which version was tested.

    - `"DRAFT"`

    - `"PUBLISHED"`

### Example

```http
curl https://api.lightfield.app/v1/sequences/$ID/tests/$TEST_ID \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "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"
}
```
