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

# Create Campaign

> Create a new campaign in draft status.

## Request Body

<ParamField body="name" type="string" required>
  Campaign name.
</ParamField>

<ParamField body="timezone" type="string" default="UTC">
  Sending timezone (e.g., `America/New_York`, `Europe/London`).
</ParamField>

<ParamField body="sendingDays" type="array" default="[1,2,3,4,5]">
  Days of the week to send emails (1=Monday, 7=Sunday).
</ParamField>

<ParamField body="sendingStartHour" type="integer" default="9">
  Hour to start sending (0-23).
</ParamField>

<ParamField body="sendingEndHour" type="integer" default="17">
  Hour to stop sending (0-23).
</ParamField>

<ParamField body="dailyLimit" type="integer" default="50">
  Maximum emails to send per day.
</ParamField>

<ParamField body="context" type="string">
  AI context for generating draft replies to campaign responses.
</ParamField>

## Response

Returns the created campaign with `201` status code. New campaigns start in `draft` status.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.foxreach.io/api/v1/campaigns" \
    -H "X-API-Key: otr_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Q2 SaaS Outreach",
      "timezone": "America/New_York",
      "sendingDays": [1, 2, 3, 4, 5],
      "sendingStartHour": 9,
      "sendingEndHour": 17,
      "dailyLimit": 30
    }'
  ```

  ```python Python SDK theme={null}
  from foxreach import FoxReach
  from foxreach.types import CampaignCreate

  client = FoxReach(api_key="otr_your_key")
  campaign = client.campaigns.create(
      CampaignCreate(
          name="Q2 SaaS Outreach",
          timezone="America/New_York",
          sending_days=[1, 2, 3, 4, 5],
          sending_start_hour=9,
          sending_end_hour=17,
          daily_limit=30,
      )
  )
  ```

  ```typescript TypeScript SDK theme={null}
  import { FoxReach } from "foxreach";

  const client = new FoxReach({ apiKey: "otr_your_key" });
  const campaign = await client.campaigns.create({
    name: "Q2 SaaS Outreach",
    timezone: "America/New_York",
    sendingDays: [1, 2, 3, 4, 5],
    sendingStartHour: 9,
    sendingEndHour: 17,
    dailyLimit: 30,
  });
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "id": "cmp_new123",
      "name": "Q2 SaaS Outreach",
      "status": "draft",
      "timezone": "America/New_York",
      "sendingDays": [1, 2, 3, 4, 5],
      "sendingStartHour": 9,
      "sendingEndHour": 17,
      "dailyLimit": 30,
      "sentToday": 0,
      "context": null,
      "totalLeads": 0,
      "totalSent": 0,
      "totalDelivered": 0,
      "totalBounced": 0,
      "totalReplied": 0,
      "totalOpened": 0,
      "createdAt": "2025-01-15T10:00:00",
      "updatedAt": "2025-01-15T10:00:00",
      "startedAt": null,
      "completedAt": null
    }
  }
  ```
</ResponseExample>

<Note>
  After creating a campaign, you'll need to add sequence steps and leads through the dashboard before starting it.
</Note>

## Rate Limit

* **100 requests per minute, per API key.** Fixed 60-second window.
* Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
* A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
