Skip to main content
GET
/
v1
/
voice-agents
/
campaigns
/
{id}
Get a campaign by ID
curl --request GET \
  --url https://api.tryhamsa.com/v1/voice-agents/campaigns/{id} \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "message": "Campaign retrieved successfully",
  "messageKey": "CAMPAIGN_RETRIEVED_SUCCESSFULLY",
  "data": {
    "id": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
    "name": "Q1 Customer Outreach",
    "status": "SCHEDULED",
    "sendType": "NOW",
    "scheduledDate": "2025-12-01T09:00:00Z",
    "scheduledTimezone": "America/New_York",
    "timeRange": {
      "days": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY"
      ],
      "startCallingTime": "09:00",
      "endCallingTime": "17:00"
    },
    "reservedConcurrency": 10,
    "projectId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "voiceAgentId": "68f7656f-098b-4c43-b165-7cfd2cc8ac40",
    "totalRecipients": 100,
    "agentName": "Call Center Agent",
    "recipients": {
      "pending": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ],
      "queued": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ],
      "inProgress": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ],
      "completed": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ],
      "failed": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ],
      "noAnswer": [
        {
          "id": "b8f7656f-098b-4c43-b165-7cfd2cc8ac60",
          "campaignId": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
          "phoneNumber": "+1234567890",
          "name": "John Doe",
          "ignoreE164Validation": false,
          "dynamicVariables": {},
          "status": "PENDING",
          "latestActionTimestamp": "2025-12-06T11:00:00.000Z",
          "attempts": 0,
          "maxAttempts": 3,
          "nextRetryAt": "2025-12-06T11:00:00.000Z",
          "jobId": "c8f7656f-098b-4c43-b165-7cfd2cc8ac70",
          "lastError": "Connection timeout",
          "completedAt": "2025-12-06T11:00:00.000Z",
          "createdAt": "2025-12-06T10:00:00.000Z",
          "updatedAt": "2025-12-06T10:00:00.000Z"
        }
      ]
    },
    "createdAt": "2025-12-06T10:00:00.000Z",
    "updatedAt": "2025-12-06T10:00:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Path Parameters

id
string<uuid>
required

UUID of the campaign.

Example:

"a8f7656f-098b-4c43-b165-7cfd2cc8ac50"

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Campaign retrieved successfully"

messageKey
string
Example:

"CAMPAIGN_RETRIEVED_SUCCESSFULLY"

data
object