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

# Get campaign configuration

> Get the workspace's outbound campaign configuration: the default policy new campaigns take, and per-agent overrides.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/convai/outbound-campaigns/config
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/outbound-campaigns/config:
    get:
      tags:
        - Agents Platform
      summary: Get campaign configuration
      description: >-
        Get the workspace's outbound campaign configuration: the default policy
        new campaigns take, and per-agent overrides.
      operationId: get_workspace_config
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkspaceConfigResponse:
      properties:
        version:
          type: integer
          title: Version
          description: Increases with every replacement; send it as `expected_version`.
        config:
          $ref: '#/components/schemas/CampaignConfig-Output'
      type: object
      required:
        - version
        - config
      title: WorkspaceConfigResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CampaignConfig-Output:
      properties:
        policy:
          $ref: '#/components/schemas/PolicyConfig-Output'
          description: The policy campaigns take unless they set their own.
        agent_policies:
          additionalProperties:
            $ref: '#/components/schemas/AgentPolicyOverride-Output'
          type: object
          title: Agent Policies
          description: Overrides of `policy`, keyed by agent ID.
        whatsapp_voice_policy:
          anyOf:
            - $ref: '#/components/schemas/AgentPolicyOverride-Output'
            - type: 'null'
          description: >-
            Overrides for WhatsApp voice campaigns, layered between the
            workspace policy and an agent's overrides. Sections left out follow
            WhatsApp voice's built-in defaults.
      type: object
      title: CampaignConfig
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PolicyConfig-Output:
      properties:
        timezone:
          type: string
          title: Timezone
          description: IANA timezone the calling periods are read in.
          default: UTC
        retry:
          $ref: '#/components/schemas/RetryPolicy'
        calling_periods:
          items:
            $ref: '#/components/schemas/CallingPeriod'
          type: array
          minItems: 1
          title: Calling Periods
          description: The weekly windows calls may be placed in.
        date_overrides:
          items:
            $ref: '#/components/schemas/DateOverride'
          type: array
          maxItems: 100
          title: Date Overrides
          description: >-
            Local dates in `timezone` whose calling windows replace
            `calling_periods`. Date ranges may not overlap.
        data_collection:
          $ref: '#/components/schemas/DataCollectionConfig'
        followup_context:
          $ref: '#/components/schemas/FollowupContextPolicy'
      additionalProperties: false
      type: object
      title: PolicyConfig
    AgentPolicyOverride-Output:
      properties:
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
        retry:
          anyOf:
            - $ref: '#/components/schemas/RetryPolicy'
            - type: 'null'
        calling_periods:
          anyOf:
            - items:
                $ref: '#/components/schemas/CallingPeriod'
              type: array
              minItems: 1
            - type: 'null'
          title: Calling Periods
        date_overrides:
          anyOf:
            - items:
                $ref: '#/components/schemas/DateOverride'
              type: array
              maxItems: 100
            - type: 'null'
          title: Date Overrides
          description: >-
            Replaces the inherited date overrides; unset inherits them and an
            empty list clears them.
        data_collection:
          anyOf:
            - $ref: '#/components/schemas/DataCollectionConfig'
            - type: 'null'
        followup_context:
          anyOf:
            - $ref: '#/components/schemas/FollowupContextPolicy'
            - type: 'null'
      additionalProperties: false
      type: object
      title: AgentPolicyOverride
      description: Each section set here replaces the whole matching section of the policy.
    RetryPolicy:
      properties:
        retry_delay_seconds:
          type: integer
          exclusiveMinimum: 0
          title: Retry Delay Seconds
          description: How long to wait before a short retry.
          default: 600
        max_short_retries:
          type: integer
          maximum: 30
          minimum: 0
          title: Max Short Retries
          description: >-
            Retries a calling window allows after a failed call. Once used up,
            the next retry waits for the following window, which starts afresh.
          default: 1
        max_total_calls:
          type: integer
          maximum: 30
          minimum: 1
          title: Max Total Calls
          description: The most calls a lead gets, counting the first.
          default: 6
        max_callbacks:
          type: integer
          maximum: 30
          minimum: 0
          title: Max Callbacks
          description: The most callbacks to honor for one number.
          default: 2
        max_redirects:
          type: integer
          maximum: 30
          minimum: 0
          title: Max Redirects
          description: The most times a lead follows a request to call another number.
          default: 2
        interval_placement:
          $ref: '#/components/schemas/IntervalPlacement'
          description: >-
            Where in a later calling window a pushed-back call lands: at its
            `start`, at a `random` time, or `rotate`d `rotate_step_seconds` past
            where the last call in that window failed.
          default: start
        rotate_step_seconds:
          type: integer
          exclusiveMinimum: 0
          title: Rotate Step Seconds
          description: How far `rotate` placement moves each call. Only used by `rotate`.
          default: 900
        max_consecutive_failures_per_number:
          anyOf:
            - type: integer
              maximum: 30
              minimum: 1
            - type: 'null'
          title: Max Consecutive Failures Per Number
          description: >-
            Calls to one number that may fail in a row before the lead moves on
            to its next listed number, or ends when there is none. An answered
            call, or a redirect to a new number, restarts the count. Unset
            leaves only `max_total_calls`.
      additionalProperties: false
      type: object
      title: RetryPolicy
    CallingPeriod:
      properties:
        weekdays:
          items:
            type: integer
            maximum: 6
            minimum: 0
          type: array
          minItems: 1
          title: Weekdays
          description: Days the intervals apply on, from `0` (Monday) to `6` (Sunday).
        intervals:
          items:
            $ref: '#/components/schemas/CallingIntervalPolicy'
          type: array
          minItems: 1
          title: Intervals
          description: Windows on each of those days. They may not overlap on any day.
      additionalProperties: false
      type: object
      required:
        - weekdays
        - intervals
      title: CallingPeriod
    DateOverride:
      properties:
        start_date:
          type: string
          format: date
          title: Start Date
          description: First local date the override applies on.
        end_date:
          type: string
          format: date
          title: End Date
          description: Last local date the override applies on, inclusive.
        intervals:
          items:
            $ref: '#/components/schemas/CallingIntervalPolicy'
          type: array
          title: Intervals
          description: >-
            Calling windows on every day from `start_date` to `end_date`,
            replacing the weekly ones. Empty means no calls on those days.
        name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Name
          description: What the override is for, such as `Christmas`.
      additionalProperties: false
      type: object
      required:
        - start_date
        - end_date
      title: DateOverride
    DataCollectionConfig:
      properties:
        callback_time:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Callback Time
          description: The item holding when the contact asked to be called back.
          default: __system_data_collection_callback_time
        redirect_phone_number:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Redirect Phone Number
          description: The item holding another number the contact asked to be called on.
          default: __system_data_collection_redirect_phone_number
        stop:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Stop
          description: The item that is true when the contact asked not to be called again.
          default: __system_data_collection_do_not_call
        mappings:
          additionalProperties:
            type: string
          type: object
          title: Mappings
          description: >-
            Copies data collection results into dynamic variables for later
            calls: each key is a data collection item ID and its value the
            variable's name.
      additionalProperties: false
      type: object
      title: DataCollectionConfig
      description: >-
        The agent's data collection items that steer follow-up calls. Each
        defaults

        to the built-in item for its purpose; `null` turns it off.
    FollowupContextPolicy:
      properties:
        call_type:
          type: boolean
          title: Call Type
          description: Pass the call type as `campaign__call_type`.
          default: true
        previous_conversation_id:
          type: boolean
          title: Previous Conversation Id
          description: >-
            Pass the last conversation's ID as
            `campaign__previous_conversation_id`.
          default: true
        previous_summary:
          type: boolean
          title: Previous Summary
          description: >-
            Pass the last conversation's summary as
            `campaign__previous_summary`.
          default: true
        previous_transcript:
          type: boolean
          title: Previous Transcript
          description: >-
            Pass the last conversation's transcript as
            `campaign__previous_transcript`.
          default: true
      additionalProperties: false
      type: object
      title: FollowupContextPolicy
      description: Which `campaign__` dynamic variables follow-up calls get.
    IntervalPlacement:
      type: string
      enum:
        - start
        - random
        - rotate
      title: IntervalPlacement
      default: start
    CallingIntervalPolicy:
      properties:
        start:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          title: Start
          description: Local start time, as `HH:MM`.
        end:
          type: string
          pattern: ^(([01]\d|2[0-3]):[0-5]\d|24:00)$
          title: End
          description: Local end time, as `HH:MM`; `24:00` ends at midnight.
      additionalProperties: false
      type: object
      required:
        - start
        - end
      title: CallingIntervalPolicy

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.