Transactional API (V2)
Introduction
This API is a service provided by E-goi to send transactional messages.
Transactional Messaging is a 1-to-1 communication channel, usually from an organization directed to a specific consumer.
They can be triggered by:
- Actions - The consumer interacts with the organization (ie.: online shopping);
- Time - The consumer's actions are time-bounded by the organization (ie.: period of inactivity).
Because of the nature of these messages,
it is expected that the consumer is interested in the content of these messages.
Therefore, they have a different treatment from marketing messages, and have a higher acceptance and opening rate.
DISCLAIMER
Please notice that this platform is more delicate in regards to the nature and processing of its messages.
It should NOT be used as a mean of mass marketing, scams, phishing or overall unruly behaviour.
Failure to comply may lead to limitation of use and even termination of account.
ApiKey
You will need to have an account in E-goi app, and produce an ApiKey by clicking on your username (top right corner) and selecting integrations.
Then there are two ways to activate the API Usage:
- E-goi app - go to Reports (on top) and select Transactional.
- API Request - call the API method Enable API usage (in Utilities).
The ApiKey will regulate the actions of the user, depending of its agreement with E-goi.
The ApiKey is necessary for a number of methods, so make sure you have a valid Api Key.;
Security Scheme Type | API Key |
---|---|
Header parameter name: | ApiKey |
Alert are a routine of messages, prepared in advance, to be triggered by events set by the user. The channel of the message can be either Sms or Email.
The Acknowledge Alerts entails two distinct steps: Create and Execute.
Create is the step where a Acknowledge Alerts flow (or template) is set.
It requires some identifying information, as well as the message to be sent.
Execute takes the Acknowledge Alerts flow, customizes the messages with To addresses and merge tags. Then, it starts the flow by sending the first message.
When the Alarm is executed, the message is resent after the interval,
unless someone responds to it (Acknowledge) or the repetition limit is reached.
The alert can be in specific states. the following is a list of states an alert can be in.
State | Description | Is Final? |
---|---|---|
pending | The Alert has been activated, and its awaiting recipient input | No |
acknowledge | The Alert was responded by a recipient | Yes |
noaction | The Alert was not responded by a recipient, having reached the Max Attempts | Yes |
cancelack | The Alert was canceled by the sender | Yes; |
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/alert/template' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "alertId": 1,
- "name": "Alert1.",
- "templateId": "2",
- "channel": "sms,email,push",
- "interval": 3600,
- "maxAttempts": 1
}
]
Create An Alert Template
This method will create and add an alert template
Authorizations:
Request Body schema: application/json
name | string Text Identifier for the template. |
templateId | string Template used to create the alert. |
channel | string Channel to where the alert template belongs to. |
interval | integer <int64> The interval in seconds between messages to the recipient(s). Maximum interval is 86400 seconds (24 hours). |
maxAttempts | integer <int64> The maximum amount of attempts to be made. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "name": "Alert1.",
- "templateId": "2",
- "channel": "sms",
- "interval": 3600,
- "maxAttempts": 1
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "alertTemplateId": "1234"
}
Get Single Alert Template
This method returns the Alert Template wih the id in the path
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Alert Template |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/alert/template/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "alertId": 1,
- "name": "Alert1.",
- "templateId": "2",
- "channel": "sms,email,push",
- "interval": 3600,
- "maxAttempts": 1
}
Remove An Alert Template
This method removes an Alert Template from the system
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Alert Template to remove |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/alert/template/<string>' \ --header 'ApiKey: '
Response samples
- 401
- 403
- 404
- 500
{- "title": "Unauthorized",
- "status": 401,
- "detail": "The request requires user authentication. Use the proper Authentication method and try again."
}
Update Single Alert Template
This method will change information about the template
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Alert Template to edit |
Request Body schema: */*
name | string Text Identifier for the template. |
templateId | string Template used to create the alert. |
channel | string Channel to where the alert template belongs to. |
interval | integer <int64> The interval in seconds between messages to the recipient(s). Maximum interval is 86400 seconds (24 hours). |
maxAttempts | integer <int64> The maximum amount of attempts to be made. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request PATCH 'slingshot.egoiapp.com/api/v2/alert/template/<string>' \ --header 'ApiKey: ' \ --header 'Content-Type: */*' \ --data-raw '{"name":"<string>","templateId":"<string>","channel":"<string>","interval":"<long>","maxAttempts":"<long>"}'
Stop Alert
This method will stop any alerts that are being processed
Authorizations:
Request Body schema: application/json
alertName | string The name of the Request. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "alertName": "1234"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "alertId": "1234"
}
Execute Alert
This method executes an alert flow , using a pre-created alert template.
Authorizations:
Request Body schema: application/json
default response
alertTemplateName required | string the name of the alert template to use. Already has to exist in the system. |
senderId required | string the id to identify the sender. |
required | Array of objects (ToEmailAlertObject) [ items ] a list of recipients of the alert. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby