ChatGPT & AI: We’re incorporating AI into engageSPARK.

Contact Parameters

The contact parameters are the key-value pair you need to provide in your API POST request body. You can decide whether to POST using a contactId, a fullPhoneNumber in international format, or a phoneNumber in local or national format.

You can start using either of these 3 contact parameters in the below engageSPARK APIs:

Subscription API – Please note that the same contact cannot be re-subscribed to the same campaign while it is still in the flow or has not yet completed.

Request Body Definition: Contact Parameters

Below are the only details we need and you need to provide in order for you to successfully subscribe a contact or phone number to a running campaign

Contact Parameter: contactId

Key Description Data Type Required Example
contactId A contactId is a unique ID assigned to an existing contact in the Contacts Page of your engageSPARK account String or Number Yes 123 or “123”

Example JSON:

Request Type: POST

Headers:

“Authorization”: “Token {API_KEY}”

“Content-Type”: “application/json”

URL: https://api.engagespark.com/v1/organizations/{orgid}/engagements/{campaignid}/subscribe

Body parameter:

{
    "contactId": 123
}
or 
{
    "contactId": "123"
}

Contact Parameter: fullPhoneNumber

Key Description Data Type Required Example
fullPhoneNumber

A fullPhoneNumber is a contact’s phone number in international format or a number with country code + phone number in local or national format. It is in E164 format, which means you can pass a number with or without leading plus.

If you pass a phone number in international format, we will subscribe the most recently created contact in your account with that phone number. If no contact exists with that phone number, then we’ll create one.

String Yes

“639123456789” or “+639123456789”

(a Philippine number in international format)

Or

“1234567890” or “+1234567890”

(a US number in international format)

Example JSON:

Request Type: POST

Headers:

“Authorization”: “Token {API_KEY}”

“Content-Type”: “application/json”

URL: https://api.engagespark.com/v1/organizations/{orgid}/engagements/{campaignid}/subscribe

Body parameter:

{
    "fullPhoneNumber": "639123456789"
}
or {
    "fullPhoneNumber": "+1234567890"
}

Contact Parameter: phoneNumber

Key Description Data Type Required Example
phoneNumber

A phoneNumber is a contact’s phone number in local or national format. It can have spaces, (), -, or any other non-number characters. The system will strip off of any non-number characters and automatically affix the correct country code based on the supplied 2-letter ISO code in phoneNumberCountry.

If you pass a phone number in national or local format with the 2-letter ISO code, we will subscribe the most recently created contact in your organization with that phone number. If no contact exists with that phone number, then we’ll create one.

String Yes

“09123456789” or “9 123 456 789”

or “9-123-456-789”

(a Philippine number in national/local format)

phoneNumberCountry If you decide to use phoneNumber contact parameter, you need to supply the 2-letter ISO code along with it. This is a way for our system to know which country the number belongs to. It is not case-sensitive String Yes “PH” or “US”

Example JSON:

Request Type: POST

Headers:

“Authorization”: “Token {API_KEY}”

“Content-Type”: “application/json”

URL: https://api.engagespark.com/v1/organizations/{orgid}/engagements/{campaignid}/subscribe

Body parameter:

{
    "phoneNumber": "09123456789",
    "phoneNumberCountry": "PH"
}
or {
    "phoneNumber": "9 123 456 789",
    "phoneNumberCountry": "PH"
}

Have questions or need a little extra help?

Get in touch with us via:

facebook-logo    messenger-logo    twitter-logo

Or