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

# Create outbound campaign

> Create an outbound campaign with its call list. `fromNumber` must be an active pool number with an outbound trunk, in the same organization as `projectId`. Contacts are validated as E.164 and de-duplicated within the batch; the call list is immutable after creation. Campaigns are created as `draft` unless `status` says otherwise — activate separately to start dialing.



## OpenAPI

````yaml https://api.pathors.com/openapi.json post /v1/campaigns
openapi: 3.1.0
info:
  title: Pathors API
  description: >-
    Public developer API for the Pathors platform. Authenticate with a developer
    key (`Authorization: Bearer dk_...`) created from the dashboard. See
    [docs.pathors.com](https://docs.pathors.com) for guides.
  version: 1.0.0
  contact:
    name: Pathors Support
    url: https://app.pathors.com/support
servers:
  - url: https://api.pathors.com
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - developerKey: []
tags:
  - name: Projects
    description: CRUD for projects owned by the authenticated developer
  - name: Agent Config
    description: Read and update a project's agent configuration and versions
  - name: Pathway
    description: Manage a project's pathway graph — nodes and decision edges
  - name: Chat
    description: OpenAI-compatible chat completions for a project agent
  - name: Sessions
    description: Create, search, terminate, and inspect agent sessions
  - name: Session History
    description: Browse and inspect persisted session history
  - name: Tools
    description: Manage a project's tools and inspect available tool types
  - name: Knowledgebases
    description: Manage knowledgebases and query them for relevant chunks
  - name: Datasets
    description: Upload and manage source files embedded into a knowledgebase
  - name: Test Cases
    description: CRUD for agent test cases
  - name: Test Suites
    description: Group test cases, run them, and read results
  - name: Webhooks
    description: Manage webhook subscriptions for project events
  - name: Calls
    description: Place outbound voice calls from a project agent
  - name: Campaigns
    description: Create and activate outbound campaigns that dial a call list
paths:
  /v1/campaigns:
    post:
      tags:
        - Campaigns
      summary: Create outbound campaign
      description: >-
        Create an outbound campaign with its call list. `fromNumber` must be an
        active pool number with an outbound trunk, in the same organization as
        `projectId`. Contacts are validated as E.164 and de-duplicated within
        the batch; the call list is immutable after creation. Campaigns are
        created as `draft` unless `status` says otherwise — activate separately
        to start dialing.
      operationId: postV1Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                projectId:
                  type: string
                  minLength: 1
                fromNumber:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                description:
                  type: string
                status:
                  default: draft
                  type: string
                  enum:
                    - draft
                    - active
                schedule:
                  type: object
                  properties:
                    timezone:
                      type: string
                      minLength: 1
                    windows:
                      minItems: 1
                      type: array
                      items:
                        type: object
                        properties:
                          dayOfWeek:
                            type: integer
                            minimum: 0
                            maximum: 6
                          startTime:
                            type: string
                            pattern: ^\d{2}:\d{2}:\d{2}$
                          endTime:
                            type: string
                            pattern: ^\d{2}:\d{2}:\d{2}$
                        required:
                          - dayOfWeek
                          - startTime
                          - endTime
                  required:
                    - timezone
                    - windows
                contacts:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      contactNumber:
                        type: string
                        minLength: 1
                      dynamicVariables:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - contactNumber
              required:
                - projectId
                - fromNumber
                - name
                - schedule
                - contacts
      responses:
        '201':
          description: Campaign created
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaignId:
                    type: string
                  status:
                    type: string
                  totalContacts:
                    type: number
                  duplicatesSkipped:
                    type: number
                required:
                  - campaignId
                  - status
                  - totalContacts
                  - duplicatesSkipped
        '400':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '401':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '403':
          description: No access to the project, or number in another org
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '404':
          description: Number or project not found, or no outbound trunk
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '500':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
components:
  securitySchemes:
    developerKey:
      type: http
      scheme: bearer
      bearerFormat: Developer key (dk_...)
      description: Developer key created from the dashboard (Settings → Developer Keys)

````