Download audience format
Campaigns
Download Audience Format
Download an Excel (.xlsx) template for uploading audience data to a campaign. Columns are dynamically generated based on the agent’s metadata input fields.
GET
Download audience format
Use this endpoint to download an Excel template for uploading audience data to a campaign.
Endpoint
GET/audience-format
Authentication: Required (workspace auth)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | number | Yes | Campaign identifier |
Response
Returns a downloadable Excel file (.xlsx).
- Content-Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - Filename:
audience_format_<timestamp>.xlsx
Template Columns
The Excel file always includesmobile_no as the first column. Additional columns are dynamically generated based on the agent’s configured metadata input fields.
| Column | Description |
|---|---|
mobile_no | Phone number in E.164 format (e.g. +12025550123) |
<custom_field> | Additional fields defined in the agent’s metadata input |
Notes
- The campaign must have an agent assigned. If no agent is linked, the request returns an error.
- Fill the template and upload it when creating or updating a campaign via the
audiencefield.
Error Cases
| Error | Cause |
|---|---|
Campaign not exist Or Agent is not assigned to campaign | Invalid campaign_id or no agent linked |

