RocketCOMS

Create a Recipient

Create a new recipient. A recipient is an individual who receives messages from a RocketCOMS campaign.

Endpoint

POST /v1/recipients

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

firstName

string

Recipient’s first name.

lastName

string

Recipient’s last name.

email

string

Recipient’s email address.

mobileNumber  REQUIRED

string

Recipient’s mobile number in E.164 format:

[+][country code][phone number including area code]

Example: +14151234

address

object

Recipient’s address.

addressType  REQUIRED

string enum, values: Workplace, Home

Type of address.

streetLine1  REQUIRED

string, max length: 255

First line of the street address.

zipCode  REQUIRED

string, max length: 10

Zip code or postal code.

countryCode  REQUIRED

string, max length: 10

Country code.

stateCode  REQUIRED

string, max length: 10

State, province, or territory.

cityName  REQUIRED

string, max length: 50

City.

Returns

Returns the Recipient object. This object contains the recipient details, including a unique ID for the recipient.

SAMPLE REQUEST

				
					{
  "firstName": "John",
  "lastName": "Smith",
  "email": "jsmith@abc.com",
  "mobileNumber": "4161234567",
  "address": {
    "addressType": "Home",
    "streetLine1": "200 Queen St",
    "zipCode": "10001",
    "countryCode": "US",
    "stateCode": "NY",
    "cityName": "New York"
  }
}
				
			

SAMPLE RESPONSE

				
					{
  "id": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
  "businessAccountId": "8th32z87-3845-9810-v7gu-1f827g98swk3",
  "firstName": "John",
  "lastName": "Smith",
  "email": "jsmith@abc.com",
  "mobileNumber": "4161234567",
  "address": {
    "addressType": "Home",
    "streetLine1": "200 Queen St",
    "zipCode": "10001",
    "countryCode": "US",
    "stateCode": "NY",
    "cityName": "New York"
  },
  "createdAt": "2023-10-23T00:42:50.311Z",
  "updatedAt": "2023-10-30T00:42:50.311Z"
}