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

# Create a campaign

> Bind a sequence to a sending inbox. After creating it, enroll leads with `POST /api/outreach/enroll`.

Requires the `write` permission.



## OpenAPI

````yaml POST /api/outreach/campaigns
openapi: 3.1.0
info:
  title: ManyPI API
  description: >-
    The REST API behind ManyPI — AI lead generation, email validation,
    cold-email outreach, agent runs and web scraping. Every endpoint is
    authenticated with a ManyPI API key (`mpi_...`) or an OAuth 2.1 access
    token, and honours the permissions granted to that credential.
  version: 2.0.0
  contact:
    name: ManyPI Support
    email: support@manypi.com
    url: https://manypi.com
servers:
  - url: https://app.manypi.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Leads
    description: Find, store, enrich and manage leads.
  - name: Email validation
    description: Verify that lead addresses can receive mail.
  - name: Outreach
    description: Inboxes, sequences, campaigns, sending and replies.
  - name: Agent
    description: Agent runs, replies and skills.
  - name: Scraping
    description: Scrapers, runs and extracted data.
  - name: Endpoints
    description: Publish scrapers as typed REST endpoints.
  - name: Account
    description: Key validation and account information.
paths:
  /api/outreach/campaigns:
    post:
      tags:
        - Outreach
      summary: Create a campaign
      description: >-
        Bind a sequence to a sending inbox. After creating it, enroll leads with
        `POST /api/outreach/enroll`.


        Requires the `write` permission.
      operationId: createCampaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - sequence_id
                - smtp_config_id
              properties:
                name:
                  type: string
                  maxLength: 120
                sequence_id:
                  type: string
                  format: uuid
                smtp_config_id:
                  type: string
                  format: uuid
                  description: An inbox id from `GET /api/outreach/inboxes`.
                reply_to:
                  type: string
                  format: email
                daily_limit:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: Never exceeds the inbox's own cap.
                schedule_enabled:
                  type: boolean
                send_days:
                  type: array
                  items:
                    type: integer
                    minimum: 0
                    maximum: 6
                  description: Defaults to Mon–Fri.
                send_from:
                  type: string
                  description: Local time, `HH:MM`.
                send_to:
                  type: string
                  description: Local time, `HH:MM`.
                timezone:
                  type: string
                track_opens:
                  type: boolean
                priority:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 5
                  description: >-
                    Higher wins the next paced slot when campaigns share an
                    inbox.
                inbox_strategy:
                  type: string
                  enum:
                    - single
                    - rotate
                    - round_robin
                    - provider_match
            example:
              name: DACH agencies — Q3
              sequence_id: …
              smtp_config_id: …
              daily_limit: 40
      responses:
        '200':
          description: The created campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Campaign:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - active
            - paused
            - archived
        sequence_id:
          type: string
          format: uuid
        smtp_config_id:
          type: string
          format: uuid
        reply_to:
          type: string
          nullable: true
        daily_limit:
          type: integer
          nullable: true
        priority:
          type: integer
        schedule_enabled:
          type: boolean
        send_days:
          type: array
          items:
            type: integer
        send_from:
          type: string
          nullable: true
        send_to:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
        track_opens:
          type: boolean
        stats:
          type: object
          properties:
            enrolled:
              type: integer
            active:
              type: integer
            completed:
              type: integer
            sent:
              type: integer
            opened:
              type: integer
            replied:
              type: integer
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: >-
            A machine-readable code on gated failures: `lead_limit`,
            `outreach_locked`, `validation_credits_exhausted`.
  responses:
    BadRequest:
      description: The request body or parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing, invalid or expired credential — or a key that lacks the
        permission this route requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A ManyPI API key (`mpi_...`) from Settings → API keys, or an OAuth 2.1
        access token obtained through the MCP consent flow.

````