---
title: "Send one message to many people (up to 10000) with automatic pacing and opt-out; people who replied STOP are skipped"
method: POST
path: "/v1/campaigns"
tags: ["Public API"]
---

# Send one message to many people (up to 10000) with automatic pacing and opt-out; people who replied STOP are skipped

`POST /v1/campaigns`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/v1/campaigns`
- Auth: HTTP bearer

## Request body

- KeyCreateInputBody
  - `all_contacts` boolean: Send to every contact of the address book
  - `contact_ids` integer[], nullable
  - `footer` string
  - `name` string, required
  - `start` boolean: Start sending right away, default true; false keeps a draft for the owner to review
  - `text` string, required: {name} is replaced with the recipient's name from the address book
  - `to` string[], nullable: Phones in international format

## Response `201`

Created

- CampaignBody
  - `created_at` string, date-time, required
  - `finished_at` string, date-time, nullable, required
  - `footer` string, required
  - `id` integer, required
  - `name` string, required
  - `project_id` integer, required
  - `public_id` string, required
  - `started_at` string, date-time, nullable, required
  - `stats` StatsBody, required
    - `delivered` integer, required
    - `failed` integer, required
    - `pending` integer, required
    - `queued` integer, required
    - `read` integer, required
    - `replied` integer, required
    - `sent` integer, required
    - `skipped` integer, required: Opted out before their turn
  - `status` 'draft' | 'running' | 'paused' | 'done' | 'canceled', required
  - `text` string, required
  - `total` integer, required

## Other responses

- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
