---
title: "Publish Sequence"
method: POST
path: "/api/v1/campaigns/{campaign_id}/sequence/publish"
tags: ["Campaigns"]
---

# Publish Sequence

`POST /api/v1/campaigns/{campaign_id}/sequence/publish`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/campaigns/{campaign_id}/sequence/publish`
- Auth: HTTP bearer

Publishes the draft sequence, making it the graph the campaign runs. Also enrols any leads that were added before a sequence existed. Steps keep their ids across publishes, so in-flight leads resume where they were.

Every step is re-validated first — publishing is the last gate before real emails go out, and a step written from the campaign builder never passed Add or Update Step. A step missing a required field (a `send` with no `subject` or `body`, say) fails the publish with a 400 naming it, rather than shipping a blank email.

The campaign still needs `state` to be `active` to send — use Resume Campaign.

## Path parameters

- `campaign_id` string, required

## Response `200`

Default Response

- object
  - `status` integer
  - `message` string
  - `data` object
    - `campaign_id` string
    - `published` boolean
    - `steps` integer: Steps in the published sequence
    - `enrolled` integer: Leads enrolled by this publish

## Other responses

- `400`: The draft sequence has no steps, or a step is missing a required config field
- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden. `code` says which permission refused: ROLE_FORBIDDEN (your role), INSUFFICIENT_SCOPE (the API key's scopes), WORKFLOW_FORBIDDEN (no access to the workflow), KEY_WORKFLOW_FORBIDDEN (the API key's workflow restriction).
- `404`: Campaign not found
- `429`: Too Many Requests — rate limit exceeded. Check `Retry-After` header for seconds until the limit resets.

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
