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

# Create campaign

> **Create a new cold email campaign**

Initialize a new campaign with core configuration including schedule, sending limits, and tracking preferences.

## Campaign Setup Workflow

Creating and launching a campaign follows a structured process:

1. **Create Campaign** (this endpoint) - Set name, schedule, and basic configuration
2. **Upload Leads** - Add recipients via CSV upload
3. **Configure Inboxes** - Select which sender email accounts will be used
4. **Design Emails** - Create email variants and automated follow-up sequences
5. **Launch** - Review and activate your campaign to start sending

## Example Usage

```python
import requests

response = requests.post(
    "https://api.coldsend.io/api/public/v1/campaigns",
    headers={"X-API-Key": "your-api-key"},
    json={
        "name": "Q1 2024 Product Launch",
        "timezone": "America/New_York",
        "sending_days": [1, 2, 3, 4, 5],
        "sending_window_start": 9,
        "sending_window_start_minute": 30,
        "sending_window_end": 17,
        "sending_window_end_minute": 15,
        "daily_limit_per_inbox": 50,
        "enable_tracking": True
    }
)

print(response.json())
```



## OpenAPI

````yaml /public_openapi.json post /api/public/v1/campaigns
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/campaigns:
    post:
      tags:
        - Campaigns
      summary: Create campaign
      description: >-
        **Create a new cold email campaign**


        Initialize a new campaign with core configuration including schedule,
        sending limits, and tracking preferences.


        ## Campaign Setup Workflow


        Creating and launching a campaign follows a structured process:


        1. **Create Campaign** (this endpoint) - Set name, schedule, and basic
        configuration

        2. **Upload Leads** - Add recipients via CSV upload

        3. **Configure Inboxes** - Select which sender email accounts will be
        used

        4. **Design Emails** - Create email variants and automated follow-up
        sequences

        5. **Launch** - Review and activate your campaign to start sending


        ## Example Usage


        ```python

        import requests


        response = requests.post(
            "https://api.coldsend.io/api/public/v1/campaigns",
            headers={"X-API-Key": "your-api-key"},
            json={
                "name": "Q1 2024 Product Launch",
                "timezone": "America/New_York",
                "sending_days": [1, 2, 3, 4, 5],
                "sending_window_start": 9,
                "sending_window_start_minute": 30,
                "sending_window_end": 17,
                "sending_window_end_minute": 15,
                "daily_limit_per_inbox": 50,
                "enable_tracking": True
            }
        )


        print(response.json())

        ```
      operationId: create_campaign_api_public_v1_campaigns_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCampaignCreateRequest'
      responses:
        '201':
          description: Campaign created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignCreateResponse'
        '400':
          description: Invalid request - check validation errors
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'campaigns:create' scope
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PublicCampaignCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 8
          title: Name
          description: >-
            Campaign name (minimum 8 characters). Use descriptive names like 'Q1
            2024 Product Launch'.
        daily_limit_per_inbox:
          type: integer
          maximum: 100
          minimum: 1
          nullable: true
          title: Daily Limit Per Inbox
          description: >-
            Maximum emails per inbox per day for this campaign. Recommended:
            20-30 for new accounts, 50-80 for warmed accounts, 80-100 for
            established accounts. Set to null for no campaign-specific limit.
        start_date:
          type: string
          format: date-time
          nullable: true
          title: Start Date
          description: >-
            Campaign start date and time (ISO 8601 format). If not specified,
            campaign starts immediately upon activation. All times are
            interpreted in the specified timezone.
        timezone:
          type: string
          maxLength: 100
          title: Timezone
          description: >-
            Timezone for campaign scheduling (IANA timezone format). Common
            values: America/New_York, Europe/London, America/Los_Angeles,
            Asia/Tokyo. All sending windows are interpreted in this timezone.
          default: America/New_York
        sending_days:
          items:
            type: integer
          type: array
          maxItems: 7
          minItems: 1
          title: Sending Days
          description: >-
            Days of the week to send emails where 1=Monday, 2=Tuesday,
            3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday. Best
            practice for B2B is [1,2,3,4,5] (Monday-Friday).
          default:
            - 1
            - 2
            - 3
            - 4
            - 5
        sending_window_start:
          type: integer
          maximum: 23
          minimum: 0
          title: Sending Window Start
          description: >-
            Start hour for sending window in 24-hour format (0-23). Emails are
            only sent during the window. Example: 9 = 9:00 AM. Recommended for
            B2B: 9 (9 AM).
          default: 9
        sending_window_start_minute:
          type: integer
          maximum: 59
          minimum: 0
          title: Sending Window Start Minute
          description: >-
            Start minute for sending window (0-59). Example: 30 = half past the
            hour.
          default: 0
        sending_window_end:
          type: integer
          maximum: 24
          minimum: 1
          title: Sending Window End
          description: >-
            End hour for sending window in 24-hour format (1-24). Must be after
            sending_window_start. Example: 17 = 5:00 PM. Recommended for B2B: 17
            (5 PM).
          default: 17
        sending_window_end_minute:
          type: integer
          maximum: 59
          minimum: 0
          title: Sending Window End Minute
          description: >-
            End minute for sending window (0-59). Must be 0 when
            sending_window_end is 24.
          default: 0
        enable_tracking:
          type: boolean
          title: Enable Tracking
          description: >-
            Enable email open tracking via tracking pixels. When enabled,
            inserts invisible 1x1 pixel to detect opens. Requires HTML email
            format. Note: Blocked by some privacy-focused email clients. Replies
            are always tracked regardless of this setting.
          default: false
        enable_unsubscribe:
          type: boolean
          title: Enable Unsubscribe
          description: >-
            Automatically insert unsubscribe link in email footer. Strongly
            recommended to keep enabled for compliance with CAN-SPAM (US), CASL
            (Canada), and GDPR (EU). Adds one-click unsubscribe and honors
            List-Unsubscribe header.
          default: true
        enable_click_tracking:
          type: boolean
          title: Enable Click Tracking
          description: >-
            Enable link click-through-rate (CTR) tracking. When enabled, links
            in emails are rewritten to route through a verified tracking domain,
            allowing you to measure how many recipients clicked links in your
            emails. Requires a verified tracking domain provisioned for one of
            your sending domains.
          default: false
        ramp_up_enabled:
          type: boolean
          title: Ramp Up Enabled
          description: >-
            Enable gradual ramp-up of daily sending volume per inbox. When
            enabled, the system starts at a low daily limit and incrementally
            increases it to ramp_up_max_limit over successive sending days.
            Recommended for new domains or inboxes to build sender reputation.
          default: false
        ramp_up_increment:
          type: integer
          maximum: 100
          minimum: 1
          nullable: true
          title: Ramp Up Increment
          description: >-
            Additional emails per inbox per day added on each ramp-up day
            (1-100). Defaults to the system-configured value when omitted.
            Example: 5 means the daily limit grows by 5 each day.
        ramp_up_max_limit:
          type: integer
          maximum: 1000
          minimum: 1
          nullable: true
          title: Ramp Up Max Limit
          description: >-
            Maximum daily emails per inbox once fully ramped (1-1000). Defaults
            to the system-configured value when omitted. The ramp-up plateaus at
            this value and stays there.
      type: object
      required:
        - name
      title: PublicCampaignCreateRequest
      description: Request schema for public campaign creation.
    CampaignCreateResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        campaign_id:
          type: string
          format: uuid
          title: Campaign Id
          description: Created campaign ID
        name:
          type: string
          title: Name
          description: Campaign name
        status:
          type: string
          title: Status
          description: Campaign status (DRAFT)
        current_step:
          type: integer
          title: Current Step
          description: Current campaign creation step
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Campaign creation timestamp
      type: object
      required:
        - success
        - message
        - campaign_id
        - name
        - status
        - current_step
        - created_at
      title: CampaignCreateResponse
      description: Response for campaign creation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````