POST /api/campaigns/upload
Upload a CSV file to add recipients to a campaign. The CSV must include a userId column and can optionally include columns that map to the template’s variable schema for per-user personalization.
Headers
Your CometChat App ID.
Your CometChat API Key.
Request body (multipart/form-data)
The CSV file to upload. Must contain a
userId column.The campaign ID to add recipients to.
CSV format
The CSV file must have a header row. TheuserId column is required. Additional columns are mapped to the template’s variable schema.
Example request
Example response
Response fields
Number of recipients added from the CSV.
Total number of recipients in the campaign after upload.
The campaign ID that received the recipients.
The CSV upload supports large files. Each row becomes a recipient record with its own variable values, enabling per-user personalization at scale.