Audience
Download Audience Template
Download a blank Excel (.xlsx) template whose columns are derived from an agent’s metadata input fields, an existing audience’s saved input variables, or explicitly chosen input-variable IDs. mobile_no must be among the resolved columns.
GET
Download audience template
Use this endpoint to download a blank Excel template whose columns match an agent’s, an existing audience’s, or a chosen set of input variables — ready to fill in and upload via Create Audience.
Passing multiple
Any of these forms work — the resulting columns follow the order the IDs were given in:
Endpoint
GET/audience/download-template
Authentication: Required (workspace auth)
Query Parameters
Only one source is used to resolve columns —
agent_id is checked first, then audience_id, then variable_id/variable_ids.
Passing multiple variable_ids
Any of these forms work — the resulting columns follow the order the IDs were given in:
- Repeat the param:
?variable_id=12&variable_id=15 - Comma-separated string:
?variable_id=12,15 - JSON-encoded array:
?variable_id=%5B12%2C15%5D(i.e.[12,15], URL-encoded)
Response
Returns a downloadable Excel file (.xlsx).
- Content-Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - Filename:
<audience_name>.xlsx(sanitized; falls back toaudience_template.xlsx)
Template Columns
One column per resolved variable key, in the order resolved.mobile_no must be among them (see Error Cases).
Behavior
- Duplicate keys (case-insensitive) are removed while preserving the first occurrence’s order.
- When using
variable_id/variable_ids, only variables owned by the caller’s workspace or global System variables resolve; unmatched IDs are silently dropped.
Error Cases
Example cURL
From an existing audience
From multiple chosen input variables
Query Parameters
Response
Excel file download
The response is of type file.

