---
title: "Get campaign sequence"
method: GET
path: "/v1/campaigns/{id}/sequence"
tags: ["campaigns"]
---

# Get campaign sequence

`GET /v1/campaigns/{id}/sequence`

## Request

- Base URL: `https://api.botdog.co`
- URL: `https://api.botdog.co/v1/campaigns/{id}/sequence`
- Auth: API key in header `x-api-key`

The campaign sequence (steps and branches) as configured in the editor. Branching steps expose their conditions — e.g. connected vs. not connected, invitation accepted vs. expired, replied vs. not replied. Use the `format` query parameter to choose the representation.

## Path parameters

- `id` string, required

## Query parameters

- `format` 'graph' | 'tree' | 'readable' | 'all'

## Response `200`

The campaign sequence in the requested format

- CampaignSequenceResponseDto
  - `campaignId` string, required: The id of the campaign this sequence belongs to
  - `editorViewType` 'SIMPLE' | 'ADVANCED', required: Which editor produced the campaign
  - `source` 'workflow' | 'legacy' | 'empty', required: Where the sequence was read from: `workflow` (modern), `legacy` (old linear sequences), or `empty` (no sequence yet).
  - `firstStep` number, nullable: Id of the first step to run, or null when there is no sequence
  - `steps` SequenceGraphNodeDto[]: Present when format is `graph` or `all`
    - `id` number, required: Stable numeric id of the step
    - `stepType` string, required: Step type
    - `label` string, required: Human-readable label for the step type
    - `metadata` object: Step configuration (message text, wait duration, etc.)
    - `next` number, nullable: Next step id for a linear step, or null to end this branch. Present only on non-branching steps.
    - `choice` object: Branch map for a conditional step: outcome -> next step id (null ends the branch). Present only on branching steps.
  - `tree` object, nullable: Present when format is `tree` or `all`. Nested step tree rooted at the first step; null for an empty sequence.
  - `readable` string[]: Present when format is `readable` or `all`. One line per step/branch.

## Other responses

- `401`: Unauthorized. API key is missing or invalid.
- `403`: The key owner has no seat assigned (write endpoints only), the team is on Botdog Managed and so may only read (write endpoints only), or the subscription/plan does not permit this.
- `404`: Campaign not found
- `429`: Rate limit exceeded. Retry after cooldown.

---

[API](https://skmtc.dev/botdog/apis/botdog-api.md) · [All operations](https://skmtc.dev/botdog/apis/botdog-api/llms.txt) · [OpenAPI document](https://skmtc.dev/botdog/apis/botdog-api/revisions/6c0213d8a608?raw)
