Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7
excludeRelated Articles

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.

Status
colourBlue
titlePOST

Code Block
/api/login

Example usage: https://sandbox5.orbita.cloud:8443/api/login

Header

Key

Value

Content-Type

application/json

Request Body

raw > JSON

Code Block
{
            "username":"example@orbita.com",
            "password":"Password@123"
}

Response Body

200 OK

Code Block
{
    "success": true,
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}

Steps to follow

  1. Log in to the environment using Login API {{url}}/api/login with Method: POST.

  2. Select body > raw > JSON and use the admin’s username and password in the request body.

     

  3. Under the header tab, use the Key-Value pair Content-Type: applicaton/json and click “Send

     

  4. You will receive a token in the response body.

     

  5. Copy the token for later use. We recommend using the environment variables to store frequently used data.

Campaign API

Status
colourBlue
titlePOST

Code Block
/api/solutions/programregistration/campaign

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

Code Block
{
    "projectId": "61012d9521be05006dce38cb",
    "channel": "email",
    "event": "sent",
    "action" : "link",
    "attributes" : {
        "camp" : "10001",
        "endpoints": ["example1@example.com", "example2@example.com"]
    }
}

With email template Template name

Code Block
{
    "projectId": "61012d9521be05006dce38cb",
    "channel": "email",
    "event": "sent",
    "action" : "link",
    "emailTemplateName": "sampleemailtemplate"
    "attributes" : {
        "camp" : "10001",
        "endpoints": ["testuser@example.com", "testusertwo@example.com"]
    }
}

Without email Template name: You have to configure the email subject, body, and so on in the configure settings.https://orbita.atlassian.net/wiki/spaces/OCS/pages/1820950585/Program+Registration+Solution#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

Code Block
{
    "message": "Campaign is processed sucessfully."
}

Steps to follow

  1. Use the Campaign API {{url}}/api/solutions/programregistration/campaign with Method: POST

  2. In the Header tab, use the following the Key-Value pairs

    1. Content-Type: applicaton/json

    2. Authorization: Bearer {{token}} - The token you copied from the response body of the Login API goes here.

  3. Set the request Body to > raw > JSON

  4. Add the request body With/Without email Template name as shown in the below screenshot and click the “Send” button.

     

  5. 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":[]

Image Added

Related Articles

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel = "solution-center"