SalesCatalysts.com API Reference (1.0.0)

Download OpenAPI specification:Download


It is a RESTful API for advanced developers that make use of HTTP client to communicate with the SalesCatalysts.com servers. Major functions on the SalesCatalysts.com GUI are mapped to the APIs listed below, so the functionality of using the GUI and API are similar.

Login

API Key

  1. You may get one from our platform:
  • Settings > Developers > API Keys
  • Follow the instructions to obtain API key
  1. Send your request with the API key in the header as apikey

OAuth2 Authorization Flow

  1. Create a new OAuth credential in our platform:
  • Settings > Developers > OAuth 2.0
  • Follow the instructions to get the code
  1. There are 2 ways to get the authorization code.

    Interactive login /oauth2/login

  • Create a REST API that accepts code as the query parameter.
  • The API should be able to send another POST request to /oauth2/token to get the access token.
  • /oauth2/login will return a login page that asks user to login.
  • User will then be automatically redirected to the API endpoint that you have specified.

    Non-interactive login /oauth2/auth

  • Send a POST request to /oauth2/auth with the login credentials.
  • Extract the authorization code from the response.
  • Exchange authorization code for token.
  • After you get the code, call /oauth2/token with the code and other parameters to get the access token.
  • Access our API service with the access token.
  • To refresh the token, call /oauth2/token and provide the refresh token and other parameters.

OAuth2

Aauth2 Authentication

Login to API server to grant OAuth2 permission. The API returns a callback URI with an OAuth2 code. You'll need this code to get the OAuth2 token. Users will be redirected to the specified URL for getting the token. You should setup your own API callback endpoint that accepts code as the query parameter. The API should be able to send another POST request to /oauth2/token. See below for further explanation.

Request Body schema: application/json
client_id
required
string

client Id used when registering oauth secret

user_login
required
string <email>

login email

user_password
required
string <password>

login password

timezone
string
Default: "Asia/Hong_Kong"

Timezone code

Responses

Request samples

Content type
application/json
{
  • "client_id": "your_client_id",
  • "user_login": "example@example.com",
  • "user_password": "example_password",
  • "timezone": "Asia/Hong_Kong"
}

Response samples

Content type
application/json

OAuth2 Login

return a login page that asks user to login, and end user will then be automatically redirected to the API endpoint that you have specified

query Parameters
clientId
required
string

client Id to identify your application, and get this Id in our system settings page

lang
string
Default: "en"

display language and supported language: en zh-HK zh-TW zh-CN

Responses

OAuth2 Token

Get the OAuth2 access token. The API returns an access token that is used in all API requests. All tokens will be expired in 7200 seconds.

Request Body schema: application/json
One of
client_id
required
string

client Id to identify your App. Get this ID in our CRM system settings

client_secret
required
string

client secret. Get this secret in our CRM system settings

grant_type
required
string
Value: "authorization_code"

OAuth2 Grant Type. Specify the code type you're using. Fill in authorization_code for getting the access token for the first time. Other grant flows are not supported.

code
required
string

The authorization code. This should be returned from our server to your redirect URI endpoint.

Responses

Request samples

Content type
application/json
Example
{
  • "client_id": "example_app",
  • "client_secret": "example_secret",
  • "grant_type": "authorization_code",
  • "code": "exmaple_code"
}

Response samples

Content type
application/json
{
  • "refresh_token": "example_refresh_token",
  • "token_type": "bearer",
  • "access_token": "example_access_token",
  • "expires_in": "7200"
}

Contact

Get Contacts

Authorizations:
API KeyOAuth 2.0
query Parameters
sortby
string
Default: "lastModifiedTime"

Sorting field

order
string
Default: "DESC"

Sorting order

offset
integer
Default: 0

pagination offset

limit
integer
Default: 10

pagination limit

search
string

keyword search

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "results": [
    ]
}

Create Contacts

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
Array of objects

You can include more fields that created in the platform. For details, please contact us at support@salescatalysts.com

Responses

Request samples

Content type
application/json
{
  • "contacts": [
    ]
}

Response samples

Content type
application/json
{
  • "updated": 16
}

Modify Contacts

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
Array of objects

You can include more fields that created in the platform. For details, please contact us at support@salescatalysts.com

Responses

Request samples

Content type
application/json
{
  • "contacts": [
    ]
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Delete Contacts

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
Array of strings <uuid>

Responses

Request samples

Content type
application/json
{
  • "id": [
    ]
}

Response samples

Content type
application/json
{
  • "updated": 16
}

Get Contact Details

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

contact Id

Responses

Response samples

Content type
application/json
{
  • "id": "a40ce6f1-c624-43f0-9371-2255344878eb",
  • "name": "Mr. example",
  • "email": "test@example.com",
  • "emailBounceStatus": "hard",
  • "emailSubscribe": true,
  • "phoneSubscribe": true,
  • "rating": 2,
  • "starred": false
}

Delete 1 Contact

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

contact Id

Responses

Response samples

Content type
application/json
{
  • "updated": 1
}

Email

Create Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
title
string

Campaign Title

senderEmail
string

Email of sender for this campaign

senderName
string

Name of sender for this campaign

subject
string

Subject for this campaign

preheader
string

Preheader on the email

object

List of recipients

templateId
string <uuid>

Email template Id for this campaign

Responses

Request samples

Content type
application/json
{
  • "title": "My first campaign",
  • "senderEmail": "marketing@example.com",
  • "senderName": "Marketing",
  • "subject": "Event Invitation",
  • "preheader": "Event will be started on coming days",
  • "recipients": {
    },
  • "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d"
}

Response samples

Content type
application/json
{
  • "id": "3b84c988-fd4d-4898-81a7-964584031e29"
}

Modify Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

title
string

Campaign Title

senderEmail
string

Email of sender for this campaign

senderName
string

Name of sender for this campaign

subject
string

Subject for this campaign

preheader
string

Preheader on the email

object

List of recipients

templateId
string <uuid>

Email template Id for this campaign

Responses

Request samples

Content type
application/json
{
  • "title": "My first campaign",
  • "senderEmail": "marketing@example.com",
  • "senderName": "Marketing",
  • "subject": "Event Invitation",
  • "preheader": "Event will be started on coming days",
  • "recipients": {
    },
  • "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Delete Email Campaigns

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
Array of strings <uuid>

Responses

Request samples

Content type
application/json
{
  • "id": [
    ]
}

Response samples

Content type
application/json
{
  • "updated": 16
}

Get Email Campaign Details

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

Email campaign Id

Responses

Response samples

Content type
application/json
{
  • "id": "a40ce6f1-c624-43f0-9371-2255344878eb",
  • "title": "My first test campaign",
  • "status": "finished",
  • "startTime": "2022-08-01T10:49:14.654Z",
  • "endTime": "2022-08-01T11:49:14.654Z",
  • "createTime": "2022-08-01T09:49:14.654Z",
  • "lastModifiedTime": "2022-08-04T01:31:17.825Z",
  • "scheduleTime": null,
  • "noSelected": 100,
  • "noDuplicated": 5,
  • "noSent": 90,
  • "noBounced": 5,
  • "noOpened": 30,
  • "noClicked": 10,
  • "noUnsubscribed": 2,
  • "noComplained": 1
}

Delete 1 Emil Campaign

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

Email campaign Id

Responses

Response samples

Content type
application/json
{
  • "updated": 1
}

Start Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

endTime
string <date-time>

Expected Campaign Finish Time

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6",
  • "endTime": "2022-10-05T14:48:00.000Z"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Schedule Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

startTime
string <date-time>

Start time of the campaign

endTime
string <date-time>

Expected Campaign Finish Time

compileMode
string

When to compile the recipients, available value: immediate or onSchedule, default as immediate

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6",
  • "startTime": "2022-10-05T12:48:00.000Z",
  • "endTime": "2022-10-05T14:48:00.000Z",
  • "compileMode": ""
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Cancel Started Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Pause Started Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Resume Paused Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Stop Started Email Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

Responses

Request samples

Content type
application/json
{
  • "id": "3763a3e6-96fa-4f5a-ace4-386dfb8dddb6"
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Get Emil Campaign Report

Authorizations:
API KeyOAuth 2.0
path Parameters
group
required
string (email-report-group)

Report group, available value: selected, filtered, duplicate, sent, bounced, opened, clicked, unsubscribed, complained

id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

Email campaign Id

query Parameters
offset
integer (integer)
Example: offset=0

Pagination offset

limit
integer (integer)
Example: limit=0

Pagination limit

Responses

Response samples

Content type
application/json
Example
{
  • "count": "10",
  • "results": [
    ]
}

Download Emil Campaign Report

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

Email campaign Id

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "error": "Missing parameters or invalid parameters",
  • "message": "Missing parameters or invalid parameters",
  • "errorCode": "API-MSG-P-011"
}

Get Email Campaign Statistics

Authorizations:
API KeyOAuth 2.0
query Parameters
sortby
string
Default: "lastModifiedTime"

Sorting field

order
string
Default: "DESC"

Sorting order

offset
integer
Default: 0

pagination offset

limit
integer
Default: 10

pagination limit

search
string

keyword search

Responses

Response samples

Content type
application/json
{
  • "count": 10,
  • "results": [
    ]
}

Message

Send SMS/MMS

Please note, SMS credit will be consumed for each SMS sent

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
type
string

It is message type, and the value is either sms or mms. The default value is sms if it is empty.

senderId
string

Then sender identity to be displayed on the mobile device

content
string

The text content of the message

required
Array of objects (phone)
subject
string

It is required for mms message and the length is up to 40 English characters or 13 UTF double byte characters.

media
string

The URL to display the media. Supported image file type includes jpg and gif. Supported video file type includes mpg and mp4

Responses

Request samples

Content type
application/json
{
  • "type": "sms",
  • "senderId": "ExampleID",
  • "content": "hello world",
  • "phones": [
    ],
  • "subject": "string",
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "phones": {
    }
}

Send Mail

Please note, 1 email credit will be consumed for each email sent

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
subject
required
string

Email subject

required
object (email-address)
required
Array of objects (email-address-array)
content
required
any

Email body

Array of objects (email-merge-contact-array)

A list of pairs of key and value for merging content with merge tags

Responses

Request samples

Content type
application/json
{
  • "subject": "This is a test email",
  • "sender": {
    },
  • "recipients": [
    ],
  • "content": "This is the email body",
  • "contact": [
    ]
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "recipients": [
    ]
}

Send Mail with Template

Please note, 1 email credit will be consumed for each email sent

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
subject
required
string

Email subject

required
object (email-address)
required
Array of objects (email-address-array)
id
required
string <uuid>

Template Id

Array of objects (email-merge-contact-array)

A list of pairs of key and value for merging content with merge tags

Responses

Request samples

Content type
application/json
{
  • "subject": "This a test email with template content",
  • "sender": {
    },
  • "recipients": [
    ],
  • "id": "77614a40-a724-4e5f-88d7-d253b623c476",
  • "contact": [
    ]
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "recipients": [
    ]
}

Optin

Get Optin Contacts

This API provides will retrieve a list of non-verified optin contact

Authorizations:
API KeyOAuth 2.0
query Parameters
sortby
string
Default: "lastModifiedTime"

Sorting field

order
string
Default: "DESC"

Sorting order

offset
integer
Default: 0

pagination offset

limit
integer
Default: 10

pagination limit

search
string

keyword search

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "results": [
    ]
}

Double Optin

This API provides email verification on user provided email address. A verification email with an encryted token !{verify_link} will be sent to that email address. Once recipient clicks on the verification link in the received email, the system will reply one of the following result:

{ status: success }: optin record was saved successfully
{ status: failed}: optin record was not saved
{ status: expired}: the verification link was expired

Please be noted, any verification link is valid for 24 hours only. A verification link will also be expired if the recipient has already confirmed subscription.

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
required
object (contact-2)
firstLandingSuccessUrl
string <url>

The first landing page if the verification email was sent successfully. If the url is not empty and in correct url format, the response of this API will redirect to that url

firstLandingFailUrl
string <url>

The first landing page if the verification email was not sent. If the url is not empty and in correct url format, the response of this API will redirect to that url

secondLandingSuccessUrl
string <url>

The second landing page if the verification was success. If the url is not empty and in correct url format, the response of this API will redirect to that url

secondLandingFailUrl
string <url>

The second landing page if the verification was failed. If the url is not empty and in correct url format, the response of this API will redirect to that url

secondLandingExpiredUrl
string <url>

The second landing page if the verification link was expired. If the url is not empty and in correct url format, the response of this API will redirect to that url

required
object (email-address-verified)
verificationEmailSubject
required
string

Email subject

object (email-address)
verificationEmailTemplateId
string <uuid>

Id of a templated managed in the platform, and the content of the template must contain the text !{verify_link} which will be replaced by the verification token.

verificationEmailBodyUrl
string <url>

The url to retrieve the content of verification email and the content must contain the text !{verify_link} which will be replaced by the verification token.

object (email-address-verified)
confirmationEmailSubject
string

Email subject

object (email-address)
confirmationEmailTemplateId
string <uuid>

Id of a template managed in the platform

confirmationEmailBodyUrl
string <url>

The url to retrieve the content of verification email

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "3b84c988-fd4d-4898-81a7-964584031e29",
  • "updated": 1,
  • "status": "sent"
}

Resend Verification Email

This API provides will resend verification email to a non verified optin contact

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

contact Id

query Parameters
resend
boolean
Default: false

Indicate true if you want to resend the verification email.

Responses

Response samples

Content type
application/json
{
  • "status": "sent"
}

SMS

Get SMS/MMS Campaign List

Authorizations:
API KeyOAuth 2.0
query Parameters
sortby
string
Default: "lastModifiedTime"

Sorting field

order
string
Default: "DESC"

Sorting order

offset
integer
Default: 0

pagination offset

limit
integer
Default: 10

pagination limit

search
string

keyword search

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "results": [
    ]
}

Create SMS/MMS Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
title
string

Campaign Title

sender
string

SenderID for this campaign

subject
string

Subject for this campaign

object

List of recipients

templateId
string <uuid>

SMS/MMS template for this campaign

schedule_time
string <date-time>

The time to start the campaign

start
boolean

Start the campaign?

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "sender": "string",
  • "subject": "string",
  • "recipients": {
    },
  • "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  • "schedule_time": "2019-08-24T14:15:22Z",
  • "start": true
}

Response samples

Content type
application/json
{
  • "id": "3b84c988-fd4d-4898-81a7-964584031e29"
}

Modify SMS/MMS Campaign

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
required
string <uuid>

Campaign Id

title
string

Campaign Title

sender
string

SenderID for this campaign

subject
string

Subject for this campaign

object

List of recipients

templateId
string <uuid>

SMS/MMS template for this campaign

schedule_time
string <date-time>

The time to start the campaign

start
boolean

Start the campaign?

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "sender": "string",
  • "subject": "string",
  • "recipients": {
    },
  • "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  • "schedule_time": "2019-08-24T14:15:22Z",
  • "start": true
}

Response samples

Content type
application/json
{
  • "updated": 1
}

Delete Multiple SMS/MMS Campaigns

Authorizations:
API KeyOAuth 2.0
Request Body schema: application/json
id
Array of strings <uuid>

Responses

Request samples

Content type
application/json
{
  • "id": [
    ]
}

Response samples

Content type
application/json
{
  • "updated": 16
}

Get 1 SMS Campaign

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

SMS campaign Id

Responses

Response samples

Content type
application/json
{
  • "id": "a40ce6f1-c624-43f0-9371-2255344878eb",
  • "title": "My first test campaign",
  • "status": "finished",
  • "startTime": "2022-08-01T10:49:14.654Z",
  • "endTime": "2022-08-01T11:49:14.654Z",
  • "createTime": "2022-08-01T09:49:14.654Z",
  • "lastModifiedTime": "2022-08-04T01:31:17.825Z",
  • "scheduleTime": null,
  • "noSelected": 100,
  • "noDuplicated": 5,
  • "noSent": 90,
  • "noUnsubscribed": 1
}

Delete 1 SMS Campaign

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

SMS campaign Id

Responses

Response samples

Content type
application/json
{
  • "updated": 1
}

Get SMS Campaign Report

Authorizations:
API KeyOAuth 2.0
path Parameters
group
required
string (sms-report-group)

Report group

id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

SMS campaign Id

query Parameters
offset
integer (integer)
Example: offset=0

Pagination offset

limit
integer (integer)
Example: limit=0

Pagination limit

Responses

Response samples

Content type
application/json
Example
{
  • "count": "10",
  • "results": [
    ]
}

Get SMS Campaign List

Authorizations:
API KeyOAuth 2.0
query Parameters
sortby
string
Default: "lastModifiedTime"

Sorting field

order
string
Default: "DESC"

Sorting order

offset
integer
Default: 0

pagination offset

limit
integer
Default: 10

pagination limit

search
string

keyword search

Responses

Response samples

Content type
application/json
{
  • "count": 5,
  • "results": [
    ]
}

Get SMS Campaign Statistics

Authorizations:
API KeyOAuth 2.0
path Parameters
id
required
string <uuid> (id)
Example: a40ce6f1-c624-43f0-9371-2255344878eb

SMS campaign Id

Responses

Response samples

Content type
application/json
{
  • "id": "a40ce6f1-c624-43f0-9371-2255344878eb",
  • "title": "My first test campaign",
  • "status": "finished",
  • "startTime": "2022-08-01T10:49:14.654Z",
  • "endTime": "2022-08-01T11:49:14.654Z",
  • "createTime": "2022-08-01T09:49:14.654Z",
  • "lastModifiedTime": "2022-08-04T01:31:17.825Z",
  • "scheduleTime": null,
  • "noSelected": 100,
  • "noDuplicated": 5,
  • "noSent": 90,
  • "noUnsubscribed": 1
}