Skip to main content

Bulk Sending

The bulks endpoints do not create templates in bulk. They send an existing template to multiple recipients, from a CSV spreadsheet. To create templates, use the Templates API.
A bulk sending (campaign) associates a workspace template, an active number, and a CSV file. After you map the CSV columns to the template parameters, Positus sends the messages one by one, and you can pause, resume, or cancel the campaign.

Authentication and Scope

The routes use the same scope and authentication as the Templates API:

Usage Flow

  1. Create the bulk sending by uploading the CSV (POST /bulks). The sending stays in status 1, awaiting data confirmation.
  2. Provide the column mapping (PUT /bulks/{bulk}/header-mapping). Positus imports the CSV rows and starts processing.
  3. Track progress (GET /bulks) and, if necessary, pause, resume, or cancel.

Sending Status

The sending is considered Failed (8) when an error occurs while importing the CSV or when the workspace is banned. Each CSV row also has its own result (pending, success, or failure), reflected in the processed_items_count and failed_items_count counters.

List Bulk Sendings

Returns all bulk sendings of the workspace, from newest to oldest, with the item counters. There is no pagination or filters.

Create Bulk Sending

If the template or the number is not found in the workspace, the API responds with 404. Response — 200 OK. The first row of the CSV is read and returned in headers, so you can build the mapping:
The response above is abbreviated. The sending object also includes mapping, user, report (generated report), and the dates started_at, finished_at, and canceled_at, which only appear when defined. The counters appear zeroed in the create and mapping responses.

Map Columns

Defines which CSV columns fill the recipient number and the template parameters. This is only possible while the sending is in status 1; otherwise, the API responds with 403.
For the header, the precedence is: header_variable (text header), then header_from_file (uploaded file), and finally header (column with the URL per row). Rows with an empty phone number are recorded as a failure (Contact number was not provided). After mapping, the sending moves to status 2 and the import of the rows starts.

Pause, Resume, and Cancel

The three routes do not receive a body and return the sending object with the counters.
These routes do not validate the current status of the sending. Check the sending status before calling them.

Learn More