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

# Update an outbound campaign



## OpenAPI

````yaml /openapi-specs/brainbase-openapi.documented.json patch /api/workers/{workerId}/deployments/voice/{deploymentId}/outbound-campaigns/{campaignId}
openapi: 3.0.0
info:
  title: Brainbase REST API
  version: 1.0.3
  description: API documentation for Brainbase REST API
servers:
  - url: https://brainbase-monorepo-api.onrender.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Team
    description: Endpoints related to team functionalities
  - name: Integrations
    description: Endpoints for integrations
  - name: Assets
    description: Endpoints for asset management
  - name: Workers
    description: Endpoints for worker operations
  - name: Flows
    description: Endpoints for flow management
  - name: Voice Deployments
    description: Endpoints for voice deployments
  - name: Voice V1 Deployments
    description: Endpoints for voice v1 deployments
  - name: Voice Deployment Logs
    description: Endpoints for voice deployment logs
  - name: Voice Deployment Outbound Data
    description: Endpoints for voice deployment outbound data
  - name: Chat Deployments
    description: Endpoints for chat deployments
  - name: Chat Deployment Logs
    description: Endpoints for chat deployment logs
  - name: Tags
    description: Endpoints for tag management and worker tag assignment
  - name: Echo
    description: Endpoints for Echo test suites, agents, and scorecards
  - name: Flow Versions
    description: Endpoints for flow version control
  - name: Deployment History
    description: Endpoints for deployment change history
  - name: Deployment Parameters
    description: Endpoints for deployment parameters
  - name: Log Exports
    description: Endpoints for async log export to CSV/JSON
  - name: Logs
    description: >-
      Universal log lookup — fetch any deployment log by ID without needing
      worker or deployment context
  - name: Deployments
    description: >-
      Universal deployment lookup — fetch any deployment by ID without needing
      worker context
paths:
  /api/workers/{workerId}/deployments/voice/{deploymentId}/outbound-campaigns/{campaignId}:
    patch:
      tags:
        - Outbound Campaigns
      summary: Update an outbound campaign
      parameters:
        - name: workerId
          in: path
          required: true
          schema:
            type: string
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                status:
                  type: string
                  enum:
                    - CREATED
                    - STARTED
                    - RUNNING
                    - COMPLETED
                    - STOPPED
                    - FAILED
                data:
                  type: array
                  items:
                    type: object
                batch_size:
                  type: integer
                batch_interval_minutes:
                  type: integer
                additional_data:
                  type: object
                telephonyProvider:
                  type: object
      responses:
        '200':
          description: Campaign updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutboundCampaign'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized
        '404':
          description: Campaign not found
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import BrainbaseLabs from 'brainbase-labs';


            const client = new BrainbaseLabs({
              apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
            });


            const outboundCampaign = await
            client.workers.deployments.voice.outboundCampaigns.update(
              'campaignId',
              { workerId: 'workerId', deploymentId: 'deploymentId' },
            );


            console.log(outboundCampaign.id);
        - lang: Python
          source: >-
            import os

            from brainbase_labs import BrainbaseLabs


            client = BrainbaseLabs(
                api_key=os.environ.get("BRAINBASE_LABS_API_KEY"),  # This is the default and can be omitted
            )

            outbound_campaign =
            client.workers.deployments.voice.outbound_campaigns.update(
                campaign_id="campaignId",
                worker_id="workerId",
                deployment_id="deploymentId",
            )

            print(outbound_campaign.id)
components:
  schemas:
    OutboundCampaign:
      type: object
      properties:
        id:
          type: string
          nullable: false
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        status:
          type: string
          nullable: false
        data:
          type: object
          nullable: false
        batchSize:
          type: integer
          nullable: false
        batchIntervalMinutes:
          type: integer
          nullable: false
        additionalData:
          type: object
          nullable: true
        telephonyProvider:
          type: object
          nullable: true
        createdAt:
          type: string
          nullable: false
          format: date-time
        updatedAt:
          type: string
          nullable: false
          format: date-time
        deploymentId:
          type: string
          nullable: false
        workerId:
          type: string
          nullable: false
        teamId:
          type: string
          nullable: false
        flowId:
          type: string
          nullable: true
        createdById:
          type: string
          nullable: true
      required:
        - id
        - status
        - data
        - batchSize
        - batchIntervalMinutes
        - createdAt
        - updatedAt
        - deploymentId
        - workerId
        - teamId
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication

````