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

# Get Campaign by ID

> Retrieves a specific campaign by ID with recipients grouped by status (pending, queued, in-progress, completed, failed, no-answer).



## OpenAPI

````yaml /api-reference/openapi.json get /v1/voice-agents/campaigns/{id}
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/campaigns/{id}:
    get:
      summary: Get a campaign by ID
      description: >-
        Retrieves a specific campaign by ID with recipients grouped by status
        (pending, queued, in-progress, completed, failed, no-answer).
      parameters:
        - in: path
          name: id
          required: true
          description: UUID of the campaign.
          schema:
            type: string
            format: uuid
            example: a8f7656f-098b-4c43-b165-7cfd2cc8ac50
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCampaignResponse'
        '400':
          description: Validation/Bad request error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Campaign not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetCampaignResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Campaign retrieved successfully
        messageKey:
          type: string
          example: CAMPAIGN_RETRIEVED_SUCCESSFULLY
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: a8f7656f-098b-4c43-b165-7cfd2cc8ac50
            name:
              type: string
              example: Q1 Customer Outreach
            status:
              type: string
              enum:
                - SCHEDULED
                - RUNNING
                - PAUSED
                - COMPLETED
                - CANCELLED
              example: SCHEDULED
            sendType:
              type: string
              enum:
                - NOW
                - SCHEDULED
              example: NOW
            scheduledDate:
              type: string
              format: date-time
              example: '2025-12-01T09:00:00Z'
              nullable: true
            scheduledTimezone:
              type: string
              example: America/New_York
              nullable: true
            timeRange:
              type: object
              nullable: true
              properties:
                days:
                  type: array
                  items:
                    type: string
                  example:
                    - MONDAY
                    - TUESDAY
                    - WEDNESDAY
                startCallingTime:
                  type: string
                  example: '09:00'
                endCallingTime:
                  type: string
                  example: '17:00'
            reservedConcurrency:
              type: integer
              example: 10
            projectId:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            voiceAgentId:
              type: string
              format: uuid
              example: 68f7656f-098b-4c43-b165-7cfd2cc8ac40
            totalRecipients:
              type: integer
              example: 100
              description: Total number of recipients in the campaign
            agentName:
              type: string
              example: Call Center Agent
              nullable: true
            recipients:
              type: object
              description: Recipients grouped by status
              properties:
                pending:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
                queued:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
                inProgress:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
                completed:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
                failed:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
                noAnswer:
                  type: array
                  items:
                    $ref: '#/components/schemas/CampaignRecipient'
            createdAt:
              type: string
              format: date-time
              example: '2025-12-06T10:00:00.000Z'
            updatedAt:
              type: string
              format: date-time
              example: '2025-12-06T10:00:00.000Z'
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    CampaignRecipient:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: b8f7656f-098b-4c43-b165-7cfd2cc8ac60
        campaignId:
          type: string
          format: uuid
          example: a8f7656f-098b-4c43-b165-7cfd2cc8ac50
        phoneNumber:
          type: string
          example: '+1234567890'
        name:
          type: string
          example: John Doe
          nullable: true
        ignoreE164Validation:
          type: boolean
          example: false
          nullable: true
        dynamicVariables:
          type: object
          nullable: true
          description: Additional custom variables for this recipient
        status:
          type: string
          enum:
            - PENDING
            - QUEUED
            - IN_PROGRESS
            - COMPLETED
            - FAILED
            - NO_ANSWER
          example: PENDING
        latestActionTimestamp:
          type: string
          format: date-time
          example: '2025-12-06T11:00:00.000Z'
        attempts:
          type: integer
          example: 0
          description: Number of call attempts made
        maxAttempts:
          type: integer
          example: 3
          description: Maximum number of call attempts allowed
        nextRetryAt:
          type: string
          format: date-time
          example: '2025-12-06T11:00:00.000Z'
          nullable: true
        jobId:
          type: string
          format: uuid
          example: c8f7656f-098b-4c43-b165-7cfd2cc8ac70
          nullable: true
        lastError:
          type: string
          example: Connection timeout
          nullable: true
        completedAt:
          type: string
          format: date-time
          example: '2025-12-06T11:00:00.000Z'
          nullable: true
        createdAt:
          type: string
          format: date-time
          example: '2025-12-06T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2025-12-06T10:00:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````