RocketCOMS

Create a Recipient Batch

You can quickly add multiple recipients to RocketCOMS as a batch. You can also choose to create a recipient list based on the batch.

To create a new recipient batch, upload a CSV file containing details for each recipient. The file must include a header row and can include the following columns. Only the Number column is required.

  • Number  Required. Recipient’s mobile number.
  • First name  Recipient’s first name.
  • Last name  Recipient’s last name.
  • Email  Recipient’s email address.
  • Street Line 1  Recipient’s street address.
  • Zip code  Recipient’s zip code or postal code.
  • Country code  Recipient’s country.
  • State code  Recipient’s state.
  • City name  Recipient’s city.

For example:

Number
+14151234
+19876543

or

Number,First name,Last name,email,Street Line,Zip code,Country code,State code,City name
+14151234,John,Smith,jsmith@abc.com,200 King St,10001,US,NY,New York
+19876543,Sam,Jones,sjones@xyz.com,100 Front St,02131,US,MA,Boston

Endpoint

POST /v1/recipients/batches

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Request Body

file  REQUIRED

string (binary)

CSV file to upload.

recipientsListName

string

Name of the recipient list to be created based on the batch file. The recipients in the CSV file will be added to this list.

batchStrategy

string enum, values: SKIP, OVERRIDE, MERGE

default value: SKIP

Method used to process the batch file. Possible values are:

  • SKIP  Add new recipients and ignore any existing recipients in the CSV file. The existing recipient data will remain unchanged.
  • OVERRIDE  The existing recipient data will be replaced entirely by the data in the CSV file.
  • MERGE  The existing recipient data will be updated with the data in the CSV file.

Returns

Returns the Recipient Batch object. This object contains the batch details and any errors.

SAMPLE REQUEST

				
					{
  "file": "recipients.csv",
  "recipientsListName": "Recipient List",
  "batchStrategy": "SKIP"
}
				
			

SAMPLE RESPONSE

				
					{
  "succeeded": 100,
  "failed": 1,
  "skipped": 8,
  "errorDetails": [
    {
      "lineNumber": 21,
      "description": "error description"
    }
  ],
  "recipientsListId": "e2bf6960-9ac7-4448-8154-d1e19d9379a1"
}