> ## Documentation Index
> Fetch the complete documentation index at: https://developer.firstsales.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Headless campaign activation

> Inspect readiness and prepare confirmed campaign tests and launches with the CLI and Developer API.

<Warning>
  The four commands are published in CLI stable `0.1.10`. Their public API adapters await backend deployment. Package installation alone does not make these routes available. Product MCP activation tools remain pending.
</Warning>

All routes use the prefix `/api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}` and a scoped Developer API key. Tenant membership and campaign permissions are checked by the server.

| CLI command | Method | Route suffix |
| - | - | - |
| `campaigns readiness` | GET | `/readiness` |
| `campaigns prepare-test-email` | POST | `/test-email/prepare` |
| `campaigns send-test-email` | POST | `/test-email` |
| `campaigns prepare-launch` | POST | `/launch/prepare` |

## Prepare a verified-member test

Read current readiness first. Test preparation requires `connectorId`, `savedCampaignVersion` and `readinessVersion`; `recipientMemberId` is optional. The target must be a verified workspace member, not an arbitrary prospect email address.

Use the prepared preview to review the sender, recipient, subject, body and consequence. Sending requires the exact returned `confirmation` together with the versions, sender and a body `idempotencyKey`. The global idempotency header does not replace this body key. The native durable SMTP receipt protects against duplicate sends; do not manufacture confirmation tokens or retry with changed payloads under the same key.

## Prepare a launch

Launch preparation requires `savedVersionId` and `readinessVersion`. It returns the native confirmation; preparation itself does not launch or resume a campaign. The existing `campaigns start` action uses that confirmation and still checks audience, schedule, billing, sender and campaign readiness. If a saved version or readiness state changes, prepare again.

## Handle refusals

Authentication and permission refusals retain their public status and error envelope. Malformed body types are rejected before activation work. Stale versions or mismatched confirmations require a fresh preparation; never bypass a blocked audience or sender check. See [errors](/docs/errors) and [idempotency](/docs/idempotency).

The [CLI guide](/cli-reference/commands) shows dry-run examples. [Canonical source contracts](https://github.com/firstsalesio/firstsales-cli/blob/main/release/firstsales-public-v1.cli-publish-contract.json) own the exact command metadata. The generated API reference will incorporate these operations with the backend release rather than present undeployed operations as live.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.