---
title: "Write the emails"
method: POST
path: "/api/v1/campaigns/{campaign_id}/emails"
tags: ["Campaigns"]
---

# Write the emails

`POST /api/v1/campaigns/{campaign_id}/emails`

## Request

- Base URL: `https://app.argorant.com`
- URL: `https://app.argorant.com/api/v1/campaigns/{campaign_id}/emails`
- Auth: HTTP bearer

Replaces the sequence. The first email needs a subject. Follow-ups stay in the same thread by default and wait `delay_days` after the previous email. Use {{first_name}}, {{last_name}}, {{company}}, {{company_normalized}} (the name people say), {{title}} and any column you sent with the people, such as {{city}}. A person without a value for a variable never gets the email with a blank. That person waits at that email (status pending, with a `hold`) until the value exists. Give a variable a default for people without one: {{company_normalized|your team}} sends the value, or the words "your team" when there is none, and {{city|}} sends nothing in its place. A default is one plain line of up to 80 characters, without braces or a second `|`. `variable_coverage` in the answer counts, per variable, the people without a value. Write {a|b} to vary a phrase per person. Leftover placeholders such as [link] or TBD come back in `warnings`, and a launch waits until they are gone. `variants` adds other versions of an email, sent in turn.

| Cost | What it does | Key scopes |
| --- | --- | --- |
| Free | Writes | `argorant:manage_lists` |

## Path parameters

- `campaign_id` string, uuid, required

## Headers

- `Idempotency-Key` string
- `X-Request-Id` string

## Request body

- object
  - `emails` object[], required: The emails in order.
    - `subject` string
    - `body` string, required
    - `delay_days` integer
    - `same_thread` boolean
    - `variants` object[]
      - `label` string
      - `subject` string
      - `body` string, required
  - `allow_placeholders` boolean: Save placeholders as written. Only when the user wants them sent like that.

## Response `200`

OK or Saved, with text to fix

- object
  - `emails` object[]
    - `step` integer
    - `subject` string
    - `delay_days` integer
    - `variants` integer

## Other responses

- `400`: 400 Bad request. `invalid_request` when the first email has no subject.
- `401`: 401 Unauthorized. `unauthorized` when the API key is missing, wrong or revoked.
- `403`: 403 Forbidden. `scope_missing` when the key lacks argorant:manage_lists.
- `404`: 404 Not found. `not_found` when the item does not exist in your workspace.
- `409`: 409 Conflict. `conflict` when the campaign is sending and the text still holds placeholders; `idempotency_conflict` when the Idempotency-Key was used with another body.
- `422`: 422 Validation error. `validation_error` when a field has the wrong type or is missing.
- `429`: 429 Too many requests. `rate_limited` when too many requests this minute.

---

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