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

# Update campaign status



## OpenAPI

````yaml POST /v1/campaigns/{id}/status
openapi: 3.0.1
info:
  title: Volubile API
  version: v1
servers:
  - url: https://api.eu.volubile.ai
    description: Generated server url
security: []
paths:
  /v1/campaigns/{id}/status:
    post:
      tags:
        - Campaigns
      summary: Update campaign status
      operationId: updateStatus
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: string
              enum:
                - ACTIVE
                - PAUSED
                - CANCELLED
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >
            Unauthorized access. The request has not been applied because it
            lacks valid authentication credentials.

            Possible reasons include that the API key is missing from the
            request headers, the provided API key is disabled,

            or the API key is associated with a customer account that is
            disabled.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Api key: []
        - Bearer token: []
components:
  schemas:
    CampaignResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the campaign
          format: uuid
        name:
          type: string
          description: Name of the campaign
        agentId:
          type: string
          description: Unique identifier of the agent to perform the campaign with
          format: uuid
        startDate:
          type: string
          description: Start date of the campaign
          format: date
          example: '2024-07-30'
        timeSlots:
          type: array
          description: >-
            Timeslots of the campaign (when the calls will be performed during
            the day). Max 2 timeslots
          items:
            $ref: '#/components/schemas/TimeSlot'
        batchSize:
          type: integer
          description: The number of calls per...
          format: int32
        retry:
          $ref: '#/components/schemas/Retry'
        days:
          type: array
          description: Days of the campaign
          items:
            type: string
            description: Days of the campaign
            enum:
              - MONDAY
              - TUESDAY
              - WEDNESDAY
              - THURSDAY
              - FRIDAY
              - SATURDAY
              - SUNDAY
        status:
          type: string
          description: Status of the campaign
          enum:
            - ACTIVE
            - PAUSED
            - CANCELLED
        timezone:
          type: string
          description: The timezone of the campaign
          example: Europe/Paris
    ErrorResponse:
      type: object
      properties:
        timestamp:
          type: string
          description: |
            Date and time when the error occurs.

            Format: UTC time - yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
          format: date-time
        status:
          type: integer
          description: Http status code
          format: int32
        message:
          type: string
          description: Information about the error
        errors:
          type: array
          description: List of specific validation errors
          items:
            $ref: '#/components/schemas/ValidationError'
    TimeSlot:
      required:
        - endTime
        - startTime
      type: object
      properties:
        startTime:
          type: string
          description: |
            Start of the time slot.

            Format: UTC time - 'HH:mm'
          example: '10:30'
        endTime:
          type: string
          description: |
            End of the time slot.

            Format: UTC time - 'HH:mm'
          example: '12:30'
    Retry:
      type: object
      properties:
        max:
          maximum: 3
          minimum: 0
          type: integer
          description: >-
            Maximum number of retries to reach the contact, minimum 0 (no
            retries), maximum 3
          format: int32
        delay:
          type: integer
          description: >-
            Minimum delay between retry attempts (in hours), minimum 1 (only
            considered when 'max' is greater than zero)
          format: int32
        retryOn:
          type: array
          description: >-
            Condition to trigger a retry (call status and qualifiers), must not
            be empty (only considered when 'max' is greater than zero)
          items:
            type: string
            description: >-
              Condition to trigger a retry (call status and qualifiers), must
              not be empty (only considered when 'max' is greater than zero)
      description: Retry parameters when the contact cannot be reached
    ValidationError:
      type: object
      properties:
        field:
          type: string
          description: Field in error
        rejectedValue:
          type: object
          description: Value in error
        message:
          type: string
          description: Description of the failed validation
      description: List of specific validation errors
  securitySchemes:
    Api key:
      type: apiKey
      description: Your API key.
      name: X-Api-Key
      in: header
    Bearer token:
      type: http
      description: Short lived Bearer token issued by /v1/auth/token.
      scheme: bearer
      bearerFormat: JWT

````