To create a new batch file for a campaign, upload a CSV file containing the recipient phone numbers and message content for the campaign. The campaign must be successfully registered with The Campaign Registry (TCR) before a batch file can be uploaded for the campaign.
The CSV file must include the following columns:
For example:
1237774444,New Product Launch This Month,0
1236663333,New Product Launch This Month,0
Line breaks are supported in the message with the special character \n (Line Feed). To avoid having an extra space in your message, do not put a space after \n.
For example, enter the message as:
\nHello World
not:
\n Hello World
Note An SMS message is limited to 140 bytes, which is 160 7-bit characters. Inclusion of 8-bit characters (such as [ ] \ | ) may reduce the number of characters included in the message. For messages over 140 bytes, RocketCOMS will split the message into multiple segments. These segments are then stitched back together into a single message on the subscriber’s mobile device. Because each segment is charged as a separate SMS message, sending long messages may increase the cost to the subscriber. Note that if you’re using URL shortening, RocketCOMS uses the message length after the URLs are shortened to determine if segmentation is required.
POST /v1/batches
Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding
campaignId REQUIRED
string (UUID)
Unique ID assigned to the campaign.
externalId REQUIRED
string
Your organization’s internal reference number assigned to the batch. This reference number is not used by RocketCOMS.
description
string
Description of the batch.
startDate REQUIRED
string, format: YYYY-MM-DD
Date to start processing the batch messages. Cannot be a date in the past.
endDate
string, format: YYYY-MM-DD
Date to stop processing the batch messages. If endDate is not provided, the batch will be processed until all messages are sent.
startTime REQUIRED
string, format: hh:mm
Time to start processing the batch messages. Messages will only be sent during the period defined by startTime and endTime.
endTime
string, format: hh:mm
Time to stop processing the batch messages. Messages will only be sent during the period defined by startTime and endTime.
shortlink
boolean, default: false
Whether all URLs in SMS messages will be sent as short links.
file REQUIRED
string (binary)
CSV file to upload.
Returns the batch details and status. For details, see the Batch object.
SAMPLE RESPONSE
{
"status": "0010",
"message": "Batch created. CSV file is in progress",
"result": {
"id": "32df8770-ee48-46e7-a8c7-9ec478883076",
"campaignId": "05ee2300-51cd-4021-b28d-11597cf9a175",
"description": "Spring Sale",
"externalId": "a7896",
"startDate": "2022-04-25",
"endDate": "2022-04-25",
"startTime": "02:00:00",
"endTime": "04:00:00",
"status": "DELIVERED",
"createdAt": "2022-04-24T16:51:03.419Z",
"updatedAt": "2022-04-24T16:51:03.419Z",
"finishedAt": "2022-04-25T04:00:03.419Z"
}
}
© 2022 Rocket Financial. All rights reserved. RocketFNCL, RocketKOR, RocketBNK are trade names of Rocket Financial Inc.