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

# Create outbound campaign

> Creates an outbound campaign with automated call scheduling. Handles workflow setup, contact loading, and job scheduling in a single request.

Provide contacts using **either** `audienceId` (existing audience) **or** `csvData` (inline contact list) — not both. If `csvData` is provided, a new audience is automatically created from it.

Optionally schedule the campaign for a future time using `dateTime`. If omitted, the campaign starts immediately.



## OpenAPI

````yaml /api-reference/openapi.json post /campaign/outbound/batch_create
openapi: 3.1.0
info:
  title: SuperU API
  description: >-
    Comprehensive API reference for SuperU voice agents, calls, tools, contacts,
    audiences, and knowledge bases.
  version: 1.0.0
servers:
  - url: https://voip-middlware.superu.ai
    description: Production
security:
  - superUApiKey: []
tags:
  - name: Calls
    description: Create and analyze calls.
  - name: Agents
    description: Create, list, import, update, and delete agents.
  - name: Agent Versions
    description: Manage versions for existing agents.
  - name: Phone Numbers
    description: Fetch phone numbers available in your account.
  - name: Call Logs
    description: Retrieve call history with filters.
  - name: Tools
    description: Create and manage callable tools.
  - name: Folders
    description: Organize agents into folders.
  - name: Contacts
    description: Create and list contacts.
  - name: Audiences
    description: Create and manage audiences and contacts.
  - name: Knowledge Base
    description: Upload and manage knowledge bases.
  - name: Campaigns
    description: Create and manage outbound campaigns with automated workflows.
paths:
  /campaign/outbound/batch_create:
    post:
      tags:
        - Campaigns
      summary: Create outbound campaign
      description: >-
        Creates an outbound campaign with automated call scheduling. Handles
        workflow setup, contact loading, and job scheduling in a single request.


        Provide contacts using **either** `audienceId` (existing audience)
        **or** `csvData` (inline contact list) — not both. If `csvData` is
        provided, a new audience is automatically created from it.


        Optionally schedule the campaign for a future time using `dateTime`. If
        omitted, the campaign starts immediately.
      operationId: createOutboundCampaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignWithWorkflowRequest'
            example:
              workflow_name: My Outbound Campaign
              assistantId: b64244f5-019c-47b6-bedd-cb359c0731a5
              batchSize: 5
              audienceId: f750d6e9-448d-4198-be9a-ed142460c329
              from_phone_number: '+14155550100'
              dateTime: '2026-04-24T08:28:00'
        description: Request body for creating an outbound campaign.
      responses:
        '200':
          description: Campaign created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCampaignWithWorkflowResponse'
              example:
                name: My Outbound Campaign
                active: true
                campaign:
                  campaign_id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
                  message: Campaign created successfully
                  status: scheduled
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \\
              --url https://voip-middlware.superu.ai/campaign/outbound/batch_create \\
              --header 'superU-Api-Key: YOUR_SUPERU_API_KEY' \\
              --data '{
              "workflow_name": "My Outbound Campaign",
              "assistantId": "b64244f5-019c-47b6-bedd-cb359c0731a5",
              "batchSize": 5,
              "audienceId": "f750d6e9-448d-4198-be9a-ed142460c329",
              "from_phone_number": "+14155550100",
              "dateTime": "2026-04-24T08:28:00"
            }'
        - lang: python
          label: Python
          source: |-
            from superu import SuperU

            client = SuperU("YOUR_SUPERU_API_KEY")

            payload = {
                "workflow_name": "My Outbound Campaign",
                "assistantId": "b64244f5-019c-47b6-bedd-cb359c0731a5",
                "batchSize": 5,
                "audienceId": "f750d6e9-448d-4198-be9a-ed142460c329",
                "from_phone_number": "+14155550100",
                "dateTime": "2026-04-24T08:28:00"
            }

            response = client.campaigns.create(**payload)
            print(response)
components:
  schemas:
    CreateCampaignWithWorkflowRequest:
      type: object
      required:
        - workflow_name
        - assistantId
        - batchSize
        - from_phone_number
        - dateTime
      properties:
        assistantId:
          type: string
          description: The agent/assistant ID to use for calls
        from_phone_number:
          type: string
          description: The phone number to make outbound calls from (with country code)
          example: '+14155550100'
        workflow_name:
          type: string
          description: Name for the workflow and campaign
          default: Custom Scheduled Workflow
        name:
          type: string
          description: >-
            Alternative field for workflow name (used if workflow_name is not
            provided)
        batchSize:
          type: integer
          description: Number of calls to process per batch (max 10)
          default: 10
          maximum: 10
          minimum: 1
        audienceId:
          type: string
          description: >-
            ID of an existing audience. Provide **either** `audienceId` **or**
            `csvData`, not both.
        csvData:
          type: array
          description: >-
            Inline contact list. Provide **either** `csvData` **or**
            `audienceId`, not both. A new audience is created automatically from
            this data.
          items:
            $ref: '#/components/schemas/CsvContact'
        dateTime:
          type: string
          format: date-time
          description: >-
            ISO 8601 datetime for scheduling the campaign. Must be in the
            future. If omitted, the campaign starts immediately.
          example: '2026-04-10T14:00:00Z'
    CreateCampaignWithWorkflowResponse:
      type: object
      properties:
        name:
          type: string
          description: Name of the campaign
        active:
          type: boolean
          description: Whether the campaign is active
        campaign:
          type: object
          properties:
            campaign_id:
              type: string
              description: UUID of the created campaign
            message:
              type: string
              example: Campaign created successfully
            status:
              type: string
              enum:
                - active
                - scheduled
              description: >-
                Campaign status — 'active' if started immediately, 'scheduled'
                if dateTime was provided
    CsvContact:
      type: object
      description: A contact entry from CSV data
      required:
        - first_name
        - country_code
        - phone_number
      properties:
        first_name:
          type: string
          description: First name of the contact
          example: Ava
        last_name:
          type: string
          description: Last name of the contact
          example: Smith
        country_code:
          type: string
          description: Country code for the phone number (e.g. +1, +91)
          example: '+1'
        phone_number:
          type: string
          description: Phone number of the contact (without country code)
          example: '4155552671'
        email:
          type: string
          description: Email address of the contact
          example: ava@example.com
        variable_values:
          type: object
          description: Custom key-value pairs for personalizing agent prompts
          additionalProperties: true
          example:
            plan: premium
            company: Acme Corp
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        status:
          type: string
          example: error
          description: Status value.
        message:
          type: string
          example: Invalid request payload
          description: Message value.
        error:
          type: string
          example: Bad Request
          description: Error value.
        code:
          type: string
          example: BAD_REQUEST
          description: Code value.
      additionalProperties: true
      description: Error Response schema.
  responses:
    BadRequest:
      description: Bad Request - invalid parameters or payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: BAD_REQUEST
            message: Request validation failed.
    Unauthorized:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: UNAUTHORIZED
            message: Invalid or missing superU-Api-Key.
    InternalServerError:
      description: Internal Server Error - unexpected backend error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: INTERNAL_SERVER_ERROR
            message: An unexpected server error occurred.
  securitySchemes:
    superUApiKey:
      type: apiKey
      in: header
      name: superU-Api-Key
      description: Your SuperU API key.

````