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

# Get campaign workflow

> Returns the campaign's workflow and the schedule context used to evaluate its attempts.



## OpenAPI

````yaml /openapi.json get /api/campaigns/{id}/workflow
openapi: 3.0.3
info:
  title: AgentCallback Public API
  version: 1.3.0
  description: >-
    Public, customer-callable AgentCallback APIs for calls, voice agents,
    campaigns, CSV uploads, phone numbers, and voices.


    **API keys:** Sign in to your AgentCallback account and open **Dashboard >
    API Keys** to create an API key. Send the key with every request using the
    `x-api-key` header.
servers:
  - url: https://www.agentcallback.com
    description: AgentCallback API server
security: []
tags:
  - name: Authentication
    description: Credential validation and API access.
  - name: Calls
    description: Create calls and retrieve call results.
  - name: Voice Agents
    description: Create and manage voice agent scripts.
  - name: Campaigns
    description: Create and manage batch call campaigns, including multi-attempt workflows.
  - name: File Uploads
    description: Upload and list CSV contact files for campaigns.
  - name: Phone Numbers
    description: List organization phone numbers.
  - name: Voices
    description: Browse voices and fetch voice previews.
paths:
  /api/campaigns/{id}/workflow:
    get:
      tags:
        - Campaigns
      summary: Get campaign workflow
      description: >-
        Returns the campaign's workflow and the schedule context used to
        evaluate its attempts.
      parameters:
        - name: id
          in: path
          required: true
          description: Campaign identifier
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Campaign workflow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignWorkflowResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated caller does not have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Campaign not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    CampaignWorkflowResponse:
      allOf:
        - $ref: '#/components/schemas/Success'
        - type: object
          properties:
            workflow_config:
              allOf:
                - $ref: '#/components/schemas/CampaignWorkflow'
              nullable: true
            timezone:
              type: string
              description: Effective workflow timezone.
            campaign_timezone:
              type: string
              nullable: true
            working_hours:
              allOf:
                - $ref: '#/components/schemas/WorkingHours'
              nullable: true
            working_hours_timezone:
              type: string
              nullable: true
            status:
              type: string
              nullable: true
            scheduled_start_time:
              type: string
              format: date-time
              nullable: true
            scheduled_timezone:
              type: string
              nullable: true
          required:
            - workflow_config
            - timezone
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        details:
          nullable: true
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
            - type: array
              items: {}
        code:
          type: string
      required:
        - success
        - error
    Success:
      type: object
      properties:
        success:
          type: boolean
          example: true
      required:
        - success
    CampaignWorkflow:
      type: object
      additionalProperties: false
      description: >-
        A chronological, multi-attempt calling sequence for each campaign
        contact.
      properties:
        retryOutcomes:
          type: array
          description: >-
            Call outcomes that advance a contact to the next attempt. Defaults
            to CALLEE_DID_NOT_PICKUP and VOICE_MAIL when omitted.
          items:
            type: string
          example:
            - CALLEE_DID_NOT_PICKUP
            - VOICE_MAIL
        attempts:
          type: array
          minItems: 1
          description: >-
            Attempts in chronological order. The entry { day: 0, startTime:
            "00:00", doubleDial: false } defines only the first attempt and
            dials once. Add a second item to schedule a second attempt. The
            initial entry's doubleDial value controls whether that first attempt
            is dialed twice.
          items:
            $ref: '#/components/schemas/CampaignWorkflowAttempt'
        timezone:
          type: string
          example: America/Los_Angeles
          description: >-
            Optional IANA timezone for workflow attempt times. Inherits the
            campaign timezone when omitted.
      required:
        - attempts
      example:
        retryOutcomes:
          - CALLEE_DID_NOT_PICKUP
          - VOICE_MAIL
        attempts:
          - day: 0
            startTime: '00:00'
            doubleDial: false
          - day: 1
            startTime: '16:00'
            doubleDial: true
          - day: 3
            startTime: '10:00'
            doubleDial: false
        timezone: America/Los_Angeles
    WorkingHours:
      type: object
      additionalProperties: false
      properties:
        weekly:
          type: object
          additionalProperties: false
          properties:
            monday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            tuesday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            wednesday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            thursday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            friday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            saturday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
            sunday:
              type: array
              items:
                $ref: '#/components/schemas/WorkingHoursSegment'
      required:
        - weekly
    CampaignWorkflowAttempt:
      type: object
      additionalProperties: false
      description: One call attempt in a campaign workflow.
      properties:
        day:
          type: integer
          minimum: 0
          description: >-
            Day offset from when the contact enters the campaign. Use 0 for the
            initial attempt.
        startTime:
          type: string
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          example: '16:00'
          description: >-
            Attempt time in 24-hour HH:mm format. The synthetic initial attempt
            uses 00:00 and follows the campaign start time.
        doubleDial:
          type: boolean
          default: false
          description: Whether to call twice back-to-back for this attempt.
      required:
        - day
        - startTime
    WorkingHoursSegment:
      type: object
      additionalProperties: false
      properties:
        start:
          type: string
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          example: '09:00'
        end:
          type: string
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          example: '17:00'
      required:
        - start
        - end
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Create and manage API keys in your AgentCallback account under Dashboard
        > API Keys.

````