Campaign API
As an admin user, you can use the Campaign API to send campaign emails to the users' email addresses.
Login API
You should log in as an admin user to use the Campaign API.
POST
/api/login
Example usage: https://sandbox5.orbita.cloud:8443/api/login
Header
Key | Value |
---|---|
Content-Type | application/json |
Request Body
raw > JSON
{
"username":"example@orbita.com",
"password":"Password@123"
}
Response Body
200 OK
{
"success": true,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}
Steps to follow
Log in to the environment using Login API
{{url}}/api/login
withMethod: POST
.Select body > raw > JSON and use the admin’s username and password in the request body.
Under the header tab, use the Key-Value pair
Content-Type: applicaton/json
and click “Send”You will receive a
token
in the response body.Copy the token for later use. We recommend using the environment variables to store frequently used data.
Campaign API
POST
Example usage: https://sandbox5.orbita.cloud:8443/api/solutions/programregistration/campaign
Header
Key | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer {{token}} |
Request Body
raw > JSON
Without email Template name
With email Template name
Without email Template name: You have to configure the email subject, body, and so on in the configure settings.Program Registration Solution Component | Configure Settings
With email Template name: You have to configure the email subject, body, and so on in the Email template. How do I customize an email template?
Response Body
200 OK
Steps to follow
Use the Campaign API
{{url}}/api/solutions/programregistration/campaign
withMethod: POST
In the Header tab, use the following the Key-Value pairs
Content-Type: applicaton/json
Authorization: Bearer {{token}}
- The token you copied from the response body of the Login API goes here.
Set the request Body to > raw > JSON
Add the request body With/Without email Template name as shown in the below screenshot and click the “Send” button.
You will receive a response with status code 200.
The emails will be sent to all the email addresses in the endpoints array of the request body "endpoints":[]