Transactional API (V2)
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.
Transport Layer Security (TLS) is a widely used authentication and encryption protocol that establishes a secure communications channel for data-in-transit while ensuring that the client and server can validate one another.
Our API requires TLS 1.2 or TLS 1.3. We recommend TLS 1.3.
TLS 1.3 ciphers
- TLS_AES_256_GCM_SHA384 (0x1302) ECDH x25519 (eq. 3072 bits RSA) FS
- TLS_CHACHA20_POLY1305_SHA256 (0x1303) ECDH x25519 (eq. 3072 bits RSA) FS
- TLS_AES_128_GCM_SHA256 (0x1301) ECDH x25519 (eq. 3072 bits RSA) FS
TLS 1.2 ciphers
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) ECDH x25519 (eq. 3072 bits RSA) FS
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) ECDH x25519 (eq. 3072 bits RSA) FS
- TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f) DH 4096 bits FS
- TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 4096 bits FS
Character limits apply to your SMS, depending on how your message is encoded.
If you use unicode, you can include special characters and emojis (your SMS will be limited to 70 chars overall).
If you don’t need special chars, opt for gsm0338 encoding to increase your character limit to 160 chars per message.
If the message exceeds the character limit, you can use the maxCount field in your payload to set how many parts it will be split into. More info
The Transactional SMTP Service consists of a simple SMTP server, listening to SSL/TLS connections on port 1587.
To configure your preferred client you need to add an account with the same e-mail as the desired client's user -
it will be used to identify the real sender in the client list of senders.
For the example below we will use the sender - info@example.com - and the username of client's user account - egoi@example.com.
The configuration for the Outgoing SMTP Server in Thunderbird would be as follows:
Parameter | Description | Definition/Example |
---|---|---|
Mail Server | the address of the smtp server | bo51.e-goi.com |
Port | the port to connect to the smtp | 1587 |
Connection Security | the security type | STARTTLS |
Authentication Method | the authentication method | password |
User Name | the user name | egoi@example.com |
After you add this configuration, you can use it by sending from the info@example.com account and using the configured SMTP Server.
After you hit send the first time, the program should challange you for a password to authenticate -
use the password you normally you to access the E-Goi Backoffice with the configured User Name (egoi@example.com in this case).
The Short Message Peer-to-Peer (SMPP) Service consists of an SMPP server that listens on the default port for SMPP connections. To configure your preferred SMPP client, you will need to add an account with the appropriate credentials provided by your SMPP provider.
The configuration for the SMPP server in an SMPP client would be as follows:
Parameter | Description | Definition/Example |
---|---|---|
Host | the hostname or IP address of the SMPP server | www51.e-goi.com |
Port | the port to connect to the SMPP server | 8056 |
System ID | the system ID for authentication | example_user |
Password | the password for authentication | your_password |
Source Address | the sender ID from E-goi | 21 |
Destination Address | destination number (123-123456789) | 351-930000000 |
Service type | the type of service | None our CLN |
TON | type of number | (0) Unknown |
NPI | numbering plan identification | (0) Unknown |
Version | the version | 3.3, 3.4, 5.0 |
After adding this configuration, you can use your SMPP client to send messages through the configured SMPP server.
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; |
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) a list of recipients of the alert. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "alertTemplateName": "welcome",
- "senderId": "1234",
- "to": [
- {
- "email": "john-doe@email.com",
- "mergeTags": [
- "name:John Doe"
]
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "alertId": "1234"
}
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"
}
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>"}'
Multi-channel are a set of pre configured messages, using all available channels,
whose sending depends on the state of the previous message.
The Multi-channel entails two distinct steps: Create and Execute
Create is the step where a multichannel flow (or template) is set.
It requires some identifying information, as well as the messages sorted and conditions defined.
Execute takes the multichannel flow, customizes the messages with To addresses and merge tags. Then, it starts the flow by sending the first message.
In order to track the state of the messages the following parameters will be set to true.
openTracking
clickTracking
The following diagram shows the workflow of the multi-channel.
The following diagram shows the states of the multi-channel.
State | Description | Is Final? |
---|---|---|
pending | The Multi-channel has been activated, and its awaiting recipient input | No |
interrupted | The Multi-channel was interrupted by the recipient, by performing an action | Yes |
finished | The Multi-channel ran out of messages, and terminated | Yes |
canceled | The Multi-channel was canceled due to an error | Yes |
Condition of messages
Name | Description | Channel |
---|---|---|
none | no condition on previous message | email, sms |
delivered | The message was successfully delivered | email, sms |
not_delivered | the message was not successfully delivered | email, sms |
open | previous message has been opened | |
not_open | previous message hasnt been opened | |
click | previous message has a link that has been clicked | |
not_click | previous message has a link that has not been clicked | email; |
Get All Multi-Channel Flows
This method returns all Multi-Channels Flows set in the system
Authorizations:
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/multi-channel/flow' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": 1,
- "name": "Welcome Cycle",
- "group": "welcome",
- "messages": [
- {
- "channel": "email",
- "interval": 3600,
- "condition": "none",
- "templateId": 1234,
- "subject": "Welcome",
- "textBody": "Welcome to the club, {{ name }}",
- "htmlBody": "<b>Welcome to the club, {{ name }}!</b>"
}
]
}
]
Create Multi-Channel Flow
This method will create and add a Multi-Channel Flow. First message doesn't need interval or condition, since it doesn't depend on other messages
Authorizations:
Request Body schema: application/json
name | string the colloquial name to refer to the plan |
group | string the tag to group the messages |
Array of objects (MultiChannelMessageObject) A list of the messages in order. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "name": "Welcome Cycle",
- "group": "welcome",
- "messages": [
- {
- "channel": "email",
- "interval": 3600,
- "condition": "none",
- "templateId": 1234,
- "subject": "Welcome",
- "textBody": "Welcome to the club, {{ name }}",
- "htmlBody": "<b>Welcome to the club, {{ name }}!</b>"
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "multiChannelId": "1234"
}
Get Single Multi-Channel Flow
This method returns the Multi-Channel Flow wih the id in the path
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Multi-Channel Flow |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/multi-channel/flow/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
[- {
- "id": 1,
- "name": "Welcome Cycle",
- "group": "welcome",
- "messages": [
- {
- "channel": "email",
- "interval": 3600,
- "condition": "none",
- "templateId": 1234,
- "subject": "Welcome",
- "textBody": "Welcome to the club, {{ name }}",
- "htmlBody": "<b>Welcome to the club, {{ name }}!</b>"
}
]
}
]
Remove Single Multi-Channel
This method removes a Multi-Channel Flow from the system
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Multi-Channel Flow to remove |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/multi-channel/flow/<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."
}
Execute Multi-Channel
This method will create and start a flow, sending the Multi-Channel of messages to the appropriate recipient
Authorizations:
Request Body schema: application/json
templateId required | string the id of the Multi Channel Template to be used. |
object (ToMultiChannelObject) information about the recipient. | |
object (SenderMultiChannelObject) information about the sender. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "templateId": "1234",
- "to": {
- "email": "john-doe@email.com",
- "phone": "351-987654321",
- "device": "token",
- "deviceOs": "android|ios",
- "mergeTags": [
- "name:John Doe"
]
}, - "sender": {
- "emailSenderId": "1234",
- "phoneSenderId": "1234",
- "appId": "pushappexample"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "multiChannelId": "1234"
}
Verify is the E-goi version of a 2-Factor Authentication (2FA) via Sms messaging.
A 2FA request is sent when a sender (organization) needs to verify the identity of a recipient.
To do this an intermediary (E-goi) will provide an independent tunnel between the two.
A successful string of events should be the following:
- The sender requests a validation code to be sent to the recipient;
- The system generates the code;
- The system sends the code to the recipient;
- The recipient submits the code to the sender;
- The sender submits the code in the system;
- The system validates the code.
In this series of events some alternatives may occur.
- Alternative - The sender wants to cancel the Verify request.
- Solution - The sender can cancel the Verify request at any point in time before the recipient validates the code.
- Alternative - The code validity expires.
- Solution - The system marks the request as expired.
- Alternative - The recipient submits the wrong code.
- Solution - The system waits for the correct code (while request has not expired).
State | Description | Is Final? |
---|---|---|
pending | The Verify has been activated, and its awaiting recipient input | No |
Validated | The code the recipient sent was valid, and the Verify resquest was successful | Yes |
Invalidated | The code the recipient sent was not valid, ant the Verify code of the user is not valid | Yes |
Canceled | The Verify request was canceled by the sender, or it has expired its validity | Yes; |
Request Token (Sms)
This method will generate a code and send a message with it to a recipient, via sms
Authorizations:
Request Body schema: application/json
senderId required | string The id of the sender. | |||||||||||||||
to required | string The phone number of the recipient of the code. Format should be | |||||||||||||||
message | string the message that the user is going to receive. location of the code should be given by using the tag {{ code }}. All instances of {{ code }} will be replaced with a code that is in accordance with the settings. If the tag is not present, the code will be added at the end of the message. | |||||||||||||||
codeLength | integer <int32> Default: 6 the length of the code in characters. Maximum is 20 characters. Default is 6 characters. | |||||||||||||||
codeValidity | integer <int32> Default: 600 the period of time the code is valid after the message has been sent, in seconds. Defaults to 600 seconds (10 min). Maximum validity is 3600 seconds (1 hour). | |||||||||||||||
codeType | string Default: "numeric" Enum: "numeric" "alpha" "alphanumeric" "hex" the format of the code. can be:
|
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "senderId": "1234",
- "to": "351-987654321",
- "message": "To authorize the operation please introduce the following code code: {{ code }}",
- "codeLength": 6,
- "codeValidity": 600,
- "codeType": "numeric"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "requestId": "1234"
}
Request Token (Email)
This method will generate a code and send a message with it to a recipient, via email
Authorizations:
Request Body schema: application/json
email required | string Email address to where the token will be sent to | |||||||||||||||
subject required | string Email subject of the message that will be sent | |||||||||||||||
senderId | string Send Identifier that will send the Token via EMAIL | |||||||||||||||
senderHash | string Send Identifier that will send the Token via EMAIL | |||||||||||||||
group | string Group name, Used to group multiple message (useful as a tag in statistics) | |||||||||||||||
message | string the message that the user is going to receive. location of the code should be given by using the tag {{ code }}. All instances of {{ code }} will be replaced with a code that is in accordance with the settings. If the tag is not present, the code will be added at the end of the message. | |||||||||||||||
codeLength | integer <int32> Default: 6 the length of the code in characters. Maximum is 20 characters. Default is 6 characters. | |||||||||||||||
codeValidity | integer <int32> Default: 600 the period of time the code is valid after the message has been sent, in seconds. Defaults to 600 seconds (10 min). Maximum validity is 3600 seconds (1 hour). | |||||||||||||||
codeType | string Default: "numeric" Enum: "numeric" "alpha" "alphanumeric" "hex" the format of the code. can be:
| |||||||||||||||
mergeTags | Array of strings |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "email": "<email@address>",
- "subject": "<subject_of_email>",
- "senderId": "0",
- "senderHash": "<your sender hash>",
- "group": "Login",
- "message": "To authorize the operation please introduce the following code code: {{ code }}",
- "codeLength": 6,
- "codeValidity": 600,
- "codeType": "numeric",
- "mergeTags": [
- "name:John Doe"
]
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "requestId": "1234"
}
Request Token (Push)
This method will generate a code and send a message with it to a recipient, via push notification
Authorizations:
Request Body schema: application/json
apikey required | string The user's apikey | |||||||||||||||
appId required | string Push Application Identifier | |||||||||||||||
title | string Push Application Message Title | |||||||||||||||
device | string Push Application Device Token | |||||||||||||||
deviceOs | string Push Application Device OS | |||||||||||||||
message | string the message that the user is going to receive. location of the code should be given by using the tag {{ code }}. All instances of {{ code }} will be replaced with a code that is in accordance with the settings. If the tag is not present, the code will be added at the end of the message. | |||||||||||||||
codeLength | integer <int32> Default: 6 the length of the code in characters. Maximum is 20 characters. Default is 6 characters. | |||||||||||||||
codeValidity | integer <int32> Default: 600 the period of time the code is valid after the message has been sent, in seconds. Defaults to 600 seconds (10 min). Maximum validity is 3600 seconds (1 hour). | |||||||||||||||
codeType | string Default: "numeric" Enum: "numeric" "alpha" "alphanumeric" "hex" the format of the code. can be:
|
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "apikey": "<your hash api key>",
- "appId": "1",
- "title": "<your_title_here>",
- "device": "<your_device_token_here>",
- "deviceOs": "android, ios",
- "message": "To authorize the operation please introduce the following code code: {{ code }}",
- "codeLength": 6,
- "codeValidity": 600,
- "codeType": "numeric"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "requestId": "1234"
}
Get Verify Request
This method gets a verify request, including status of it
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Verify Request |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/verify/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": "1234",
- "messageId": "1234",
- "senderId": "1234",
- "recipientNumber": "351-987654321",
- "code": "1234",
- "codeTTL": 600,
- "status": "pending",
- "createDate": "2020-03-06T11:57:34Z",
- "message": "Here is your code: {CODE}"
}
Validate Verify Code
This method validates the code submitted by the recipient. This request should be made by the sender of the Verify request
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Verify Request |
Request Body schema: application/json
code | string The Code to validate. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "code": "123456"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
[- {
- "requestId": "1234",
- "status": "verified"
}
]
Cancel Verify Request
This method will cancel the requested verify. No codes will be further generated or confirmed within the context of the id of the message
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Verify Request |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request POST 'slingshot.egoiapp.com/api/v2/verify/<string>/cancel' \ --header 'ApiKey: '
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
[- {
- "requestId": "1234"
}
]
Resend Verify Code
This method will resend the requested verify. A new code will be generated and sent to the recipient
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Verify Request |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request POST 'slingshot.egoiapp.com/api/v2/verify/<string>/resend' \ --header 'ApiKey: '
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
[- {
- "requestId": "1234"
}
]
Emails can be send using the API, or using the SMTP Server.
The API should be the preferred method, as it is better documented, and have much more functionalities.
However, for simple emails, SMTP use is fine. See below for its configuration.
Emails are composed using different sets of information:
Parameter | Description | Examples |
---|---|---|
Contacts | All contact information. Includes main recipients well as other interested recipients. | To, Cc, Bcc, From, Reply-to |
Content | The content of the message. Includes text (plain text or HTML) and attachments. | Subject, Body (HTML or Text), Template, Attachments |
Options | The configuration of the email to the sender. | Tracking, Registered, Header, Group/Tag |
Status | The information about the message after it has been sent. | Status |
The Sender can not interact with the status and events.
He can only follow and check the state of the message.
The following is a diagram of all the states an email can be in.
Status | Description | Is Final? |
---|---|---|
created | The message is created | No |
queued | The message is awayting processing | No |
processing | The message is beeing processed | No |
spool | The message is beeing stored and prepared for sending | No |
sending | The email is beeing sent | No |
finished | The message finishes sending | No |
send_failed | The message failed to be sent | Yes |
broken | The API could not connect to the SMTP Server | Yes |
delivered | The message was delivered | Yes |
rejected | The message was rejected based on its content (rejected recipient) | Yes |
bounce_hard | The message could not reach the recipient. Though not "permanent", retries should not be attempted. | Yes |
bounce_soft | The message could not be delivered to the recipient, but may be attempted later. | Yes |
Emails can have file attachments, whether inline with the email text, or as an attachment. The maximum size for an attachment is 5Mb. In the case of Registered, the maximum attachment size is 3Mb.
Attachments are a special feature, available to those who request it. If you wish to send attachments, please contact support using the help section on your E-Goi Backoffice.
Attachments cannot be used with bulk emails, even when bulk emails use a template that includes attachments.
If you want to send an image as an inline attachment, you should include the attachment as followed by the documentation, with the disposition \inline. Then, simply add the following tag to your message:
<img src=\cid:{{index}}\/>
Please beware of escaping the quotation marks in the payload. The index is the position of the image in the array of attachments, so if the attachment to include is in position 0, then the tag should be:
<img src=\cid:0\/>
Files can be sent using the Mime Type x-
namespace. However, they are considered experimental, and mostly are used to support older software.
Documents File Type |
Possible Mime Types |
---|---|
application/pdf | |
.doc .docx |
application/msword |
.ppt .pptx |
application/powerpoint application/mspowerpoint |
.xls .xlsx |
application/excel |
.txt | text/plain |
.html | text/html |
Images File Type |
Possible Mime Types |
---|---|
.jpeg .jpg |
image/jpeg |
.png | image/png |
.gif | image/gif |
.svg | image/svg+xml |
.bmp | application/bmp |
.psd | application/octet-stream |
.ico | image/x-icon |
Audio File Type |
Possible Mime Types |
---|---|
.mp3 | audio/mpeg |
.wav | audio/wav |
.midi | audio/midi |
Video File Type |
Possible Mime Types |
---|---|
.mp4 | video/mpeg |
.avi | video/avi |
Compression File Type |
Possible Mime Types |
---|---|
.exe | application/octet-stream |
.jar | application/java-archive |
.tar | application/x-tar |
.zip | application/x-zip-compressed application/zip |
.rar | application/octet-stream application/x-rar-compressed |
Please note that some email inboxes block certain file extensions, mostly related to code files ( .vb
, .js
, .py
), shell commands (.bat
, .ps1
, .ksh
, .msh
) or executable files (.exe
, .jar
, .apk
). We do not advise any attempts to send files of these nature.
Slingshot allows its users to send emails and Sms through its API, and to keep detailed logs from all steps of a message's lifecycle.
This feature is called Registered Message.
Our records detail dates and times, sender and recipient information, subject and content of the message and its attachments,
in addition to all other events related:
sent, delivery, failed reception, opening and clicks recorded - for emails.
To enable Registered Message in your account, please get in touch with our Customer Services team,
through the HELP section in your e-goi interface, or simply call us.
If you supply custom data when sending (via API or SMTP),
every event returned via webhooks will contain the message related custom data.
The custom data in the webhook will be returned as it was supplied at the time of sending. An example follows.
For instance - if you send an Sms message (via API) using the arguments:
{
"phone": "321-987654321",
"senderId": "2",
"message": "An Sms message (with full utf8 support 👍")",
"customData": "{\"meta-data\", \"my relevant metadata\"}"
}
You will receive events with the following data (example for the processed event):
[
{
"data" : {
"recipientMobile" : "321-987654321",
"groupId" : 1,
"recipientId" : 4,
"senderMobile" : "321-987654321",
"messageId" : 1160,
"customData": "{\"meta-data\", \"my relevant metadata\"}"
"createDate" : 1453430810084
},
"action" : "processed",
"actionDate" : 1453430810150
}
]
Get Email Message Log
Retrieve the message life cycle and all information of the that message using a message ID
Authorizations:
path Parameters
messageId required | integer <int32> Example: 1 Id of the message sent |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/log/<integer>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "campaign": {
- "id": 0,
- "domainId": 0,
- "groupId": 0,
- "userId": 0,
- "senderId": 0,
- "replySenderId": 0,
- "subscriberId": 0,
- "templateId": "string",
- "name": "string",
- "domain": "string",
- "domainShared": true,
- "channel": "string",
- "customSenderName": "string",
- "currentStatus": "string",
- "contentSubject": "string",
- "contentHtml": "string",
- "contentText": "string",
- "contentFilename": "string",
- "createDate": "2019-08-24T14:15:22Z",
- "createIp": "string",
- "openTrackingEnabled": true,
- "clickTrackingEnabled": true,
- "register": true,
- "mergeTags": "string",
- "attachement": true,
- "pluginKey": "string",
- "hasunsubscribe": true,
- "optInIpAddress": "string",
- "autoResponseSuppress": "string",
- "cc": [
- {
- "name": "string",
- "email": "string"
}
], - "bcc": [
- {
- "name": "string",
- "email": "string"
}
], - "advancedTemplateData": "string"
}, - "subscriberEmail": "string",
- "campaignStatusLog": [
- {
- "status": "string",
- "createDate": "string"
}
], - "shortenerCampaign": {
- "id": 0,
- "domainId": 0,
- "groupId": 0,
- "userId": 0,
- "senderId": 0,
- "replySenderId": 0,
- "subscriberId": 0,
- "templateId": "string",
- "name": "string",
- "domain": "string",
- "domainShared": true,
- "channel": "string",
- "customSenderName": "string",
- "currentStatus": "string",
- "contentSubject": "string",
- "contentHtml": "string",
- "contentText": "string",
- "contentFilename": "string",
- "createDate": "2019-08-24T14:15:22Z",
- "createIp": "string",
- "openTrackingEnabled": true,
- "clickTrackingEnabled": true,
- "register": true,
- "mergeTags": "string",
- "attachement": true,
- "pluginKey": "string",
- "hasunsubscribe": true,
- "optInIpAddress": "string",
- "autoResponseSuppress": "string",
- "cc": [
- {
- "name": "string",
- "email": "string"
}
], - "bcc": [
- {
- "name": "string",
- "email": "string"
}
], - "advancedTemplateData": "string",
- "shorteners": [
- {
- "campaignId": 0,
- "link": "string",
- "domain": "string"
}
]
}
}
]
Send a single email message
Send a single email message to a single recipient
Authorizations:
Request Body schema: application/json
default response
domain | string the Domain to de used in the sender email. |
senderId required | string The code identification of the sender profile to be used. |
senderName | string The name to be associated with the Domain to form the email. |
to required | string The email to send the message to. |
cc | Array of strings The Cc field in the email. |
bcc | Array of strings The Bcc field in the email. |
subject required | string The subject of the message. |
htmlBody | string The html version of the body of the message. |
textBody | string The text version of the body of the message. |
openTracking | boolean The option to track if the message is opened. |
clickTracking | boolean The option to track if the message is clicked. |
Array of DataAttachmentRequest (object) or UrlAttachmentRequest (object) (AttachmentRequest) Attachment Data | |
mergeTags | Array of strings A list of the merge tags to replace information gaps in the email. The format of each tag should be |
customData | string Extra Data related to the campaign to be re-sent via WebHook. |
priority | string Default: "non-urgent" Enum: "urgent" "high" "normal" "non-urgent" The priority of the message. |
registered | boolean option to register the message. Its an exclusive feature for senders that require it. |
object (HeaderOptionsRequest) The header options of the message. | |
group | string Default: "default" The group of the message. |
scheduleTo | string Schedule Date to send message |
object (ReplyToArgs) Name and Email Address of Reply to | |
snippet | string HTML snippet for html message, replaces the first characters that when when message arrives in inbox |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "domain": "e-goi.com",
- "senderId": "1234",
- "senderName": "Customer Support",
- "to": "john-doe@email.com",
- "cc": [
- "interested-person1@email.com"
], - "bcc": [
- "interested-person2@email.com"
], - "subject": "Welcome to the Club",
- "htmlBody": "Hello %name%! <b>Welcome!</b> ",
- "textBody": "Hello %name%! Welcome! ",
- "openTracking": true,
- "clickTracking": true,
- "attachment": [
- {
- "filename": "document_final",
- "mimeType": "application/pdf",
- "arrangement": "attachment",
- "data": "wolQTkcNChoKAAAADUlIRFIAAABIAAAASAgGAAAAVcOtwrNHA"
}
], - "mergeTags": [
- "name:John Doe"
], - "customData": "meta-data, my relevant metadata",
- "priority": "urgent",
- "registered": false,
- "header": {
- "listUnsubscribe": true,
- "optInIpAddress": "192.168.99.100"
}, - "group": "welcome",
- "scheduleTo": "yyyy-MM-dd HH:mm:ss",
- "replyTo": {
- "name": "egoi",
- "email": "egoi@e-goi.com"
}, - "snippet": "string"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "messageId": "1234"
}
Send Multiple Email Messages
Send multiple email messages to various recipient, up to 100
Authorizations:
Request Body schema: application/json
default response
domain | string the Domain to de used in the sender email. |
senderId required | string The code identification of the sender profile to be used. |
senderName | string The name to be associated with the Domain to form the email. |
to required | Array of strings non-empty The To field in the email. |
cc | Array of strings The Cc field in the email. |
bcc | Array of strings The Bcc field in the email. |
subject required | string The subject of the message. |
htmlBody | string The html version of the body of the message. |
textBody | string The text version of the body of the message. |
openTracking | boolean The option to track if the message is opened. |
clickTracking | boolean The option to track if the message is clicked. |
mergeTags | Array of strings A list of the merge tags to replace information gaps in the email. The format of each tag should be |
customData | string Extra Data related to the campaign to be re-sent via WebHook. |
priority | string Default: "non-urgent" Enum: "urgent" "high" "normal" "non-urgent" The priority of the message. |
registered | boolean option to register the message. Its an exclusive feature for senders that require it. |
object (HeaderOptionsRequest) The header options of the message. | |
group | string Default: "default" The group of the message. |
scheduleTo | string Schedule Date to send message |
object (ReplyToArgs) Name and Email Address of Reply to | |
snippet | string HTML snippet for html message, replaces the first characters that when when message arrives in inbox |
callBackUrl | string Callback Url for Bulk Response. The callback used will be the first one found. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
[- {
- "domain": "e-goi.com",
- "senderId": "1234",
- "senderName": "Customer Support",
- "to": [
- "john-doe@email.com"
], - "cc": [
- "interested-person1@email.com"
], - "bcc": [
- "interested-person2@email.com"
], - "subject": "Welcome to the Club",
- "htmlBody": "Hello %name%! <b>Welcome!</b> ",
- "textBody": "Hello %name%! Welcome! ",
- "openTracking": true,
- "clickTracking": true,
- "mergeTags": [
- "name:John Doe"
], - "customData": "meta-data, my relevant metadata",
- "priority": "urgent",
- "registered": false,
- "header": {
- "listUnsubscribe": true,
- "optInIpAddress": "192.168.99.100"
}, - "group": "welcome",
- "scheduleTo": "yyyy-MM-dd HH:mm:ss",
- "replyTo": {
- "name": "egoi",
- "email": "egoi@e-goi.com"
}, - "snippet": "string",
- "callBackUrl": "string"
}
]
Response samples
- 204
- 400
- 401
- 403
- 500
"string"
Templates are pre-defined messages that are used to ease message building and maintain coherence between topics and groups.
They are shared between multiple endpoint definitions and services (such as Multi-Channel or Alert)
Despite some differences in structure between channels, they have the subject and body already set, along with some options.
The Slingshot API
enables the user to , should he choose to, create and execute advanced templates.These templates use the template engine JTWIG
, both in template structure and code language.
When creating a template , either for email or sms channels, you can use templates (for email you can use full html templates with CSS in them, in sms , standard sms message templates). When sending either an email or an sms, you can pass a JSON data structure within the parameter advancedTemplatingData
.
Notes
See the section How To
in order to see how to use the Slingshot API
advanced template feature.
This section of Slingshot API
advanced templating will demonstrate on how to use advanced templates
in both email and sms. The aspects and code snippets below will demonstrate mostly common features and basic usage
of advanced template.
The topics we will approach here will be the following:
- Basic Replacement
- Logic integration (If/else)
- Dynamic Replacement with Objects
- Iteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example represents an example where we want to replace the name value:
"html" : "This is {{name.value}}
"
OR
"text" : "This is {{name.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "name": "Slingshot API" }
The result should be:
This is Slingshot APILogic integration (if/else)
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example illustrates the usage of logic operators in advanced templates(if/else):
"html" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
OR
"text" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "flag": false }
The result should be:
False ValueDynamic Replacement with Objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
OR
"text" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "item": { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" } }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 eurosIteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
OR
"text": "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "items": [ { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Shirt", "price": "25.00 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Pin", "price": "10.00 euros", "description" : "The new line of items from slingshot" } ] }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 euros Item:Slingshot Shirt Description:The new line of items from slingshot Price:25.00 euros Item:Slingshot Pin Description:The new line of items from slingshot Price:10.00 euros
Note
For more information regarding on how to use JTWIG templating language, please see this guide.
Code Snippets enable the use to use other templates inside a template. This joins the functionality of the JTWIG
advanced templating language with the versatility of Slingshots template creation , management and usage.
For example, if you want to create an Email template that will be the fusion of a template with customer data and another with product information, first we create the personal information template.
{
"templateName" : "CodeSnippet - Personal",
"subject" : "CodeSnippets",
"htmlBody" : "{{ firstname.value }} {{ lastname.value }} {{ age.value }} {{ height.value }} {{ address.value }}
" ,
"openTracking": false,
"clickTracking": false,
}
Next we create the product information template.
{
"templateName" : "CodeSnippet - Product",
"subject" : "CodeSnippets",
"htmlBody" : "{{ quantity.value }} {{ description.value }} {{ price.value }}
",
"openTracking": false,
"clickTracking": false,
}
Finally we create the macro template , with the position of both the previous templates plus additional information
{
"templateName" : "CodeSnippet - All",
"subject" : "CodeSnippets",
"htmlBody" : "{{ order.value }} {{ firstTemplate }} {{ secondTemplate }}
",
"openTracking": false,
"clickTracking": false,
}
After all templates have been created, when sending an email, the following attributes must be present in the payload in order to use code snippets.
[{ "senderId": "sender id", "senderName": "sender name", "to": [ "email here" ], "templateId" : "template id", "advancedTemplatingData": { "codeSnippets" : [{ "firstTemplate" : "Template_Identifier_CodeSnippet_Personal", "firstname" : "SlingShot", "lastname" : "User", "age" : 30, "height" : "1.77m2, "address" : "E-goi Street" },{ "secondTemplate" : "Template_Identifier_CodeSnippet_Product", "quantity" : 3, "description" : "E-goi Cap", "price" : "4.15euros" } ], order : 123456 } }]
The final result , the sent email will have the following:
123456 SlingShot User 30 1.77m E-goi Street 3 E-goi Cap 4.15euros
Notes
The previous examples dont have HTML code in them, put you can use it in order to create powerful templates.
The attribute codeSnippets
must be present in order to render code snippets.
When creating a codeSnippets, any word that contains either Template
or template
is reserved to be processed to get the templateId.
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/templates' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": "1234",
- "subject": "Hello World",
- "textBody": "This is the text version of the email body.",
- "htmlBody": "<b>This</b> is the <u>html</u> version of the <i>email</i> body.",
- "openTracking": false,
- "clickTracking": false,
- "templateName": "Hello World",
}
]
Create Single Email Template
Creates a new template record for Email
Authorizations:
Request Body schema: application/json
subject required | string The subject of the message. |
textBody | string The text version of the email body. |
htmlBody | string The html version of the email body. |
openTracking | boolean Option to track if email message is opened. |
clickTracking | boolean Option to track if email message is clicked. |
templateName required | string The name to help set the template apart. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "subject": "Hello World",
- "textBody": "This is the text version of the email body.",
- "htmlBody": "<b>This</b> is the <u>html</u> version of the <i>email</i> body.",
- "openTracking": false,
- "clickTracking": false,
- "templateName": "Hello World"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "templateId": "1234"
}
Get Single Email Template
Gets an Email Template
Authorizations:
path Parameters
id required | string Id of the Email Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/templates/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": "1234",
- "subject": "Hello World",
- "textBody": "This is the text version of the email body.",
- "htmlBody": "<b>This</b> is the <u>html</u> version of the <i>email</i> body.",
- "openTracking": false,
- "clickTracking": false,
- "templateName": "Hello World",
}
Remove Single Email Template
Removes a single Email Template
Authorizations:
path Parameters
id required | string Id of the Email Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/email/templates/<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 Email Template
Updates an Email template, given a template id
Authorizations:
path Parameters
id required | string Id of the Email Template. Cannot be empty. |
Request Body schema: */*
subject required | string The subject of the message. |
textBody | string The text version of the email body. |
htmlBody | string The html version of the email body. |
openTracking | boolean Option to track if email message is opened. |
clickTracking | boolean Option to track if email message is clicked. |
templateName required | string The name to help set the template apart. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request PATCH 'slingshot.egoiapp.com/api/v2/email/templates/<string>' \ --header 'ApiKey: ' \ --header 'Content-Type: */*' \ --data-raw '{"subject":"<string>","templateName":"<string>","textBody":"<string>","htmlBody":"<string>","openTracking":"<boolean>","clickTracking":"<boolean>"}'
Validate Single Domain
Clears the validation cache and validates the supplied configured Domain.
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Domain |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/domain/<string>/validate' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "isValid": true
}
Get All Domains
Retrieve the list of all Domains available for the sender to the recipients.
Authorizations:
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/domain' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": "1234",
- "server": "my-business.com",
- "default": true
}
]
Create New Domain
Add a new Domain to the list of available Domains for the sender to the recipient.
Authorizations:
Request Body schema: application/json
default | boolean Default: false Option to set the domain as default. |
domain required | string The Domain to add. |
fallbackUrl | string The url to associate the domain. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "default": false,
- "domain": "my-business.com",
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "id": "1234",
- "server": "my-business.com",
- "default": true
}
Get Single Domain
Retrieve the Domain with the id in the path.
Authorizations:
path Parameters
id required | string Example: 1234 The id of the Verify Request |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/domain/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": "1234",
- "server": "my-business.com",
- "default": true
}
Get Default Domain
Retrieve the currently configured default Domain. If no default domain is set, the list will be empty.
Authorizations:
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/domain/default' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
{- "id": "1234",
- "server": "my-business.com",
- "default": true
}
Change Default Domain
Change the currently configured default Domain
Authorizations:
Request Body schema: application/json
domainId | string The Domain id to default. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "domainId": "1234"
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": "1234",
- "server": "my-business.com",
- "default": true
}
Get Email Report
Retrieve Mail Reports and Statistics. Entries can be customizable
Authorizations:
query Parameters
group | string Example: group=12 The name of the group to search |
groupBy | string Example: groupBy=month The option to group the results. Can be either |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/reports?group=<string>&groupBy=<string>&dateStart=<string>&dateEnd=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "groupId": "string",
- "groupName": "string",
- "viewsTotal": 0,
- "viewsUnique": 0,
- "clicksTotal": 0,
- "clicksUnique": 0,
- "metricsTotal": 0,
- "metricsProcessed": 0,
- "metricsSent": 0,
- "eventRemoved": 0,
- "eventSoftBounce": 0,
- "eventHardBounce": 0,
- "timePeriod": "string"
}
]
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/senders' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": "string",
- "name": "string",
- "email": "string",
- "senderStatus": "string",
- "deleted": true
}
]
Get Single Email Message
Retrieve the message with the id from path
Authorizations:
path Parameters
id required | integer <int32> The id of the message. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/messages/<integer>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": 0,
- "groupId": 0,
- "subject": "string",
- "textBody": "string",
- "htmlBody": "string",
- "templateId": "string",
- "senderId": 0,
- "createDate": "2019-08-24T14:15:22Z",
- "bcc": [
- {
- "name": "string",
- "email": "string"
}
], - "cc": [
- {
- "name": "string",
- "email": "string"
}
], - "status": "string",
- "unsubscribe": true,
- "subscriberId": 0,
- "clickTracking": true,
- "openTracking": true,
- "domainId": 0,
- "domain": "string",
- "replyToId": 0,
- "name": "string",
- "register": true
}
Get All Email Messages
Retrieve the list of all email messages. Results can be filtered by messages ids, group or channel. The result will be a combination of all parameters present
Authorizations:
query Parameters
group | string Example: group=12 The name of the group to search |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
destination | string Example: destination=johnDoe@email.com The mobile number of a recipient. |
status | string Enum: "created" "queued" "processing" "spool" "sending" "finished" "send_failed" "broken" "delivered" "rejected" "bounce_hard" "bounce_soft" "event_view" "event_click" "scheduled" "canceled" The status to check the message. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/email/messages?group=<string>&dateStart=<string>&dateEnd=<string>&destination=<string>&status=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
[- {
- "createDate": "2019-08-24T14:15:22Z",
- "groupName": "string",
- "subject": "string",
- "subscriberEmail": "string",
- "messageId": "string",
- "senderEmail": "string"
}
]
Sms messages are short (on average 160 char) messages that are sent via GSM.
Parameter | Description | Examples |
---|---|---|
Contacts | All contact information. Includes main recipientas well as other interested recipients. | To, From |
Content | The content of the message. Includes text (plain text or HTML) and attachments. | Body, Template |
Options | The configuration of the email to the sender. | Tracking, Registered, Group/Tag |
Status | The information about the message after it has been sent. | Status |
The following is a diagram of all the states an Sms can be in.
Status | Description | Is Final? |
---|---|---|
created | The message was created | No |
queued | The message has been queued for processing | No |
processing | The message is beeing processed | No |
spool | The message is awayting sending | No |
finished | The message is being sent to the phone operator | No |
sending | The message is being sent by the phone operator | No |
send_failed | The phone operator ran into an error, and the message could not be delivered | Yes |
delivered | The message has been successfuly delivered to the recipient | Yes |
rejected | The message had incongruencies and will not be sent (eg. invalid recipient) | Yes |
Depending on the country a phone number belongs to, there may be some restrictions regarding message properties.
The list only presents known restrictions. This means that everything else should be allowed. If you find any new restriction please contact us, so that we can change and update the list :)
Portugal
Portuguese carriers do not allow Shortcode Sender IDs (19200). Instead, try to use either international numeric senders (351987654321) or alphanumeric senders ('E-goi Support').
Russian senders are filtered by portuguese network providers, so it's advised to avoid using them.
Some alphanumeric sender ID's are blocked in Portugal, including variations in spelling. The list of Sender ID's are as follows:
- Vodafone
- Meo
- Optimus
- Zon
- PTelecom
- Pt
- Tmn
- CavacoSilva
- Vodafone
- PJ
- MPublico
- PSP
Brazil
Brazilian Carriers are not always guarantee to support international messages. Unicode and Binary messages are not supported. Successful delivery of concatenated messages is not guaranteed, and is not supported by Oi Network Provider,
Sender ID of a message is changed to 28908 or a local number to facilitate successful delivery of messages.
SMS containing content related to adult, alcohol, politics or religion are not allowed, and may be blocked.
Some landline numbers maybe converted to mobile numbers, with the information being updated once per month.
Spain
There are no known restrictions to Spain. However, messages with numeric Sender IDs may travel through an alternate route to their destination, potentially increasing the time to deliver.
Colombia
In order to successfully deliver a message, the Sender ID may be changed to a local number (Shortcode 85307 or 87457, or long number).
Colombian network operators do not provide delivery receipts, so we can't guarantee the message has been delivered.
India
Traffic type | Content Allowed | Sender ID | Restrictions/Regulation |
---|---|---|---|
Domestic transactional | Transactional traffic, OTP | 6 digit alpha (not alphanumeric) with preregistration | The registered Alpha Sender ID will be added with 2 letters as a prefix, depending on which carrier was used to deliver the SMS to the final operator or 2 random numbers; e.g. MD-XXXXXX (where XXXXXX is the registered Sender ID) |
Domestic Promotional (none opted in) | Promo/Marketing content | Sender ID not supported and will be change to a random short code | Promo sms will be blocked to numbers registered in ´National Do Not Call´ Registry as per TRAI regulation. Promo sms are only delivered between 9am-9pm IST time. SMS outside the time range will be queued and delivered next day. |
International (transactional/Opted-in Promo) | International originated transactional content & Opt-in Promo content. (If client registered in India,but sms originated outside India, will be identified as International traffic). | Sender ID not supported and will be change to a random short/long virtual number | For opted in promo sms, same Regulation apply as in for Domestic Promotional(Opted in) listed below. |
International Promotional (none opted in) | NA | NA | NA |
Domestic Promotional (opted in) | This traffic can only be routed via transactional bind with opted in confirmations from each subscriber MSISDN | 6 digit alpha (not alphanumeric) with pre-registration | Handling party (customer) of the promo content must have subscriber opted in consent per each MSISDN and should provide the information to the providers handling the traffic either upfront or on demand in an event if the termination party gets a complaint from a mobile operator (mobile subscriber complaining to operator for receiving a promo content) as proof the subscriber has given consent to receive promo content. Failing to do so (not defined the actual time period) provider will be liable for penalty charges depend on the number of violations. Need to have contractual provisions in order to accept the penalty charges in case of violation. |
Any unregistered sender ID is overwritten with a local short code as required by Indian regulations, whether the destination number is registered on the NDNC list or not.
Messages towards Jammu and Kashmir networks will be blocked by the government due to political sensitivity.
SMS containing content related to politics during election periods are not allowed.
Slingshot allows its users to send emails and Sms through its API, and to keep detailed logs from all steps of a message's lifecycle.
This feature is called Registered Message.
Our records detail dates and times, sender and recipient information, subject and content of the message and its attachments,
in addition to all other events related:
sent, delivery, failed reception, opening and clicks recorded - for emails.
To enable Registered Message in your account, please get in touch with our Customer Services team,
through the HELP section in your e-goi interface, or simply call us.
If you supply custom data when sending (via API or SMTP),
every event returned via webhooks will contain the message related custom data.
The custom data in the webhook will be returned as it was supplied at the time of sending. An example follows.
For instance - if you send an Sms message (via API) using the arguments:
{
"phone": "321-987654321",
"senderId": "2",
"message": "An Sms message (with full utf8 support 👍")",
"customData": "{\"meta-data\", \"my relevant metadata\"}"
}
You will receive events with the following data (example for the processed event):
[
{
"data" : {
"recipientMobile" : "321-987654321",
"groupId" : 1,
"recipientId" : 4,
"senderMobile" : "321-987654321",
"messageId" : 1160,
"customData": "{\"meta-data\", \"my relevant metadata\"}"
"createDate" : 1453430810084
},
"action" : "processed",
"actionDate" : 1453430810150
}
]
Get Sms Message Log
Retrieve the message life cycle and all information of the that message using a message ID
Authorizations:
path Parameters
messageId required | integer <int32> Example: 1 Id of the message sent |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/log/<integer>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "campaign": {
- "id": 0,
- "domainId": 0,
- "groupId": 0,
- "userId": 0,
- "senderId": 0,
- "replySenderId": 0,
- "subscriberId": 0,
- "templateId": "string",
- "name": "string",
- "domain": "string",
- "domainShared": true,
- "channel": "string",
- "customSenderName": "string",
- "currentStatus": "string",
- "contentSubject": "string",
- "contentHtml": "string",
- "contentText": "string",
- "contentFilename": "string",
- "createDate": "2019-08-24T14:15:22Z",
- "createIp": "string",
- "openTrackingEnabled": true,
- "clickTrackingEnabled": true,
- "register": true,
- "mergeTags": "string",
- "attachement": true,
- "pluginKey": "string",
- "hasunsubscribe": true,
- "optInIpAddress": "string",
- "autoResponseSuppress": "string",
- "cc": [
- {
- "name": "string",
- "email": "string"
}
], - "bcc": [
- {
- "name": "string",
- "email": "string"
}
], - "advancedTemplateData": "string"
}, - "subscriberMobile": "string",
- "campaignStatusLog": [
- {
- "status": "string",
- "createDate": "string"
}
], - "shortenerCampaign": {
- "id": 0,
- "domainId": 0,
- "groupId": 0,
- "userId": 0,
- "senderId": 0,
- "replySenderId": 0,
- "subscriberId": 0,
- "templateId": "string",
- "name": "string",
- "domain": "string",
- "domainShared": true,
- "channel": "string",
- "customSenderName": "string",
- "currentStatus": "string",
- "contentSubject": "string",
- "contentHtml": "string",
- "contentText": "string",
- "contentFilename": "string",
- "createDate": "2019-08-24T14:15:22Z",
- "createIp": "string",
- "openTrackingEnabled": true,
- "clickTrackingEnabled": true,
- "register": true,
- "mergeTags": "string",
- "attachement": true,
- "pluginKey": "string",
- "hasunsubscribe": true,
- "optInIpAddress": "string",
- "autoResponseSuppress": "string",
- "cc": [
- {
- "name": "string",
- "email": "string"
}
], - "bcc": [
- {
- "name": "string",
- "email": "string"
}
], - "advancedTemplateData": "string",
- "shorteners": [
- {
- "campaignId": 0,
- "link": "string",
- "domain": "string"
}
]
}
}
]
Send a Single Sms Message
Send a single sms message to a single recipient
Authorizations:
Request Body schema: application/json
default response
to required | string The contact of the recipient. format should be countryCode-phoneNumber. |
from required | string The id of the sender. |
textBody required | string The content of the message. |
encoding required | |
maxCount required | integer <int32> >= 1 the maximum amount of messages to be sent (if the textBody is too big for a single message). |
mergeTags | Array of strings A list of the merge tags to replace information gaps in the email. The format of each tag should be |
priority | string Default: "non-urgent" Enum: "urgent" "high" "normal" "non-urgent" The priority of the message. |
customData | string Extra Data related to the campaign to be re-sent via WebHook. |
registered | boolean option to register the message. Its an exclusive feature for senders that require it. |
group | string Default: "default" The group of the message. |
scheduleTo | string Schedule Date to send message |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "to": "351-987654321",
- "from": "1234",
- "textBody": "Here's a bunch of props to you, {{ name }}, enjoy!",
- "encoding": "unicode",
- "maxCount": 1,
- "mergeTags": [
- "name:John Doe"
], - "priority": "non-urgent",
- "customData": "meta-data, my relevant metadata",
- "registered": false,
- "group": "welcome",
- "scheduleTo": "yyyy-MM-dd HH:mm:ss"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "messageId": "1234"
}
Send Multiple Sms Messages
Send multiple sms messages to various recipients, up to 100 messages
Authorizations:
Request Body schema: application/json
default response
to required | string The contact of the recipient. format should be countryCode-phoneNumber. |
from required | string The id of the sender. |
textBody required | string The content of the message. |
encoding required | |
maxCount required | integer <int32> >= 1 the maximum amount of messages to be sent (if the textBody is too big for a single message). |
mergeTags | Array of strings A list of the merge tags to replace information gaps in the email. The format of each tag should be |
priority | string Default: "non-urgent" Enum: "urgent" "high" "normal" "non-urgent" The priority of the message. |
customData | string Extra Data related to the campaign to be re-sent via WebHook. |
registered | boolean Default: false option to register the message. Its an exclusive feature for senders that require it. |
group | string Default: "default" The group of the message. |
scheduleTo | string Schedule Date to send message |
callBackUrl | string Callback Url for Bulk Response. The callback used will be the first one found. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
[- {
- "to": "351-987654321",
- "from": "1234",
- "textBody": "Here's a bunch of props to you, {{ name }}, enjoy!",
- "encoding": "unicode",
- "maxCount": 1,
- "mergeTags": [
- "name:John Doe"
], - "priority": "non-urgent",
- "customData": "meta-data, my relevant metadata",
- "registered": false,
- "group": "welcome",
- "scheduleTo": "yyyy-MM-dd HH:mm:ss",
- "callBackUrl": "string"
}
]
Response samples
- 204
- 400
- 401
- 403
- 500
"string"
Templates are pre-defined messages that are used to ease message building and maintain coherence between topics and groups.
They are shared between multiple endpoint definitions and services (such as Multi-Channel or Alert)
Despite some differences in structure between channels, they have the subject and body already set, along with some options.
The Slingshot API
enables the user to , should he choose to, create and execute advanced templates.These templates use the template engine JTWIG
, both in template structure and code language.
When creating a template , either for email or sms channels, you can use templates (for email you can use full html templates with CSS in them, in sms , standard sms message templates). When sending either an email or an sms, you can pass a JSON data structure within the parameter advancedTemplatingData
.
Notes
See the section How To
in order to see how to use the Slingshot API
advanced template feature.
This section of Slingshot API
advanced templating will demonstrate on how to use advanced templates
in both email and sms. The aspects and code snippets below will demonstrate mostly common features and basic usage
of advanced template.
The topics we will approach here will be the following:
- Basic Replacement
- Logic integration (If/else)
- Dynamic Replacement with Objects
- Iteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example represents an example where we want to replace the name value:
"html" : "This is {{name.value}}
"
OR
"text" : "This is {{name.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "name": "Slingshot API" }
The result should be:
This is Slingshot APILogic integration (if/else)
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example illustrates the usage of logic operators in advanced templates(if/else):
"html" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
OR
"text" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "flag": false }
The result should be:
False ValueDynamic Replacement with Objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
OR
"text" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "item": { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" } }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 eurosIteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
OR
"text": "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "items": [ { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Shirt", "price": "25.00 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Pin", "price": "10.00 euros", "description" : "The new line of items from slingshot" } ] }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 euros Item:Slingshot Shirt Description:The new line of items from slingshot Price:25.00 euros Item:Slingshot Pin Description:The new line of items from slingshot Price:10.00 euros
Note
For more information regarding on how to use JTWIG templating language, please see this guide.
Code Snippets enable the use to use other templates inside a template. This joins the functionality of the JTWIG
advanced templating language with the versatility of Slingshots template creation , management and usage.
For example, if you want to create an Email template that will be the fusion of a template with customer data and another with product information, first we create the personal information template.
{
"templateName" : "CodeSnippet - Personal",
"subject" : "CodeSnippets",
"htmlBody" : "{{ firstname.value }} {{ lastname.value }} {{ age.value }} {{ height.value }} {{ address.value }}
" ,
"openTracking": false,
"clickTracking": false,
}
Next we create the product information template.
{
"templateName" : "CodeSnippet - Product",
"subject" : "CodeSnippets",
"htmlBody" : "{{ quantity.value }} {{ description.value }} {{ price.value }}
",
"openTracking": false,
"clickTracking": false,
}
Finally we create the macro template , with the position of both the previous templates plus additional information
{
"templateName" : "CodeSnippet - All",
"subject" : "CodeSnippets",
"htmlBody" : "{{ order.value }} {{ firstTemplate }} {{ secondTemplate }}
",
"openTracking": false,
"clickTracking": false,
}
After all templates have been created, when sending an email, the following attributes must be present in the payload in order to use code snippets.
[{ "senderId": "sender id", "senderName": "sender name", "to": [ "email here" ], "templateId" : "template id", "advancedTemplatingData": { "codeSnippets" : [{ "firstTemplate" : "Template_Identifier_CodeSnippet_Personal", "firstname" : "SlingShot", "lastname" : "User", "age" : 30, "height" : "1.77m2, "address" : "E-goi Street" },{ "secondTemplate" : "Template_Identifier_CodeSnippet_Product", "quantity" : 3, "description" : "E-goi Cap", "price" : "4.15euros" } ], order : 123456 } }]
The final result , the sent email will have the following:
123456 SlingShot User 30 1.77m E-goi Street 3 E-goi Cap 4.15euros
Notes
The previous examples dont have HTML code in them, put you can use it in order to create powerful templates.
The attribute codeSnippets
must be present in order to render code snippets.
When creating a codeSnippets, any word that contains either Template
or template
is reserved to be processed to get the templateId.
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/templates' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": 1234,
- "textBody": "Hello World",
- "encoding": "unicode",
- "maxCount": 1,
- "templateName": "Hello World",
}
]
Create Single Sms Template
Creates a new template record for Sms
Authorizations:
Request Body schema: application/json;charset=UTF-8
textBody required | string The text body of the message. |
encoding required | |
maxCount required | integer <int32> >= 1 The maximum amount of messages to be sent (if the textBody is too big for a single message). |
templateName required | string The name of the template. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "textBody": "Hello World",
- "encoding": "unicode",
- "maxCount": 1,
- "templateName": "Hello World"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "templateId": "1234"
}
Get Single Sms Template
Gets an Sms Template
Authorizations:
path Parameters
id required | string Id of the Sms Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/templates/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": 1234,
- "textBody": "Hello World",
- "encoding": "unicode",
- "maxCount": 1,
- "templateName": "Hello World",
}
Remove Single Sms Template
Remove Sms Template
Authorizations:
path Parameters
id required | string Id of the Sms Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/sms/templates/<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 Sms Template
Updates an Sms template, given a template id
Authorizations:
path Parameters
id required | string Id of the Sms Template. Cannot be empty. |
Request Body schema: */*
textBody required | string The text body of the message. |
encoding required | |
maxCount required | integer <int32> >= 1 The maximum amount of messages to be sent (if the textBody is too big for a single message). |
templateName required | string The name of the template. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request PATCH 'slingshot.egoiapp.com/api/v2/sms/templates/<string>' \ --header 'ApiKey: ' \ --header 'Content-Type: */*' \ --data-raw '{"encoding":"unicode","maxCount":"<integer>","templateName":"<string>","textBody":"<string>"}'
Get Sms Report
Retrieve Sms Reports and Statistics. Entries can be customizable
Authorizations:
query Parameters
group | string Example: group=12 The id of the group to search |
groupBy | string Example: groupBy=month The option to group the results. Can be either |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/reports?group=<string>&groupBy=<string>&dateStart=<string>&dateEnd=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "groupId": "string",
- "groupName": "string",
- "metricsTotal": 0,
- "metricsTotalParts": 0,
- "metricsNotDelivered": 0,
- "metricsSent": 0,
- "metricsSentParts": 0,
- "metricsDelivered": 0,
- "metricsDeliveredParts": 0,
- "metricsRejected": 0,
- "metricsRejectedParts": 0,
- "metricsUnknown": 0,
- "timePeriod": "string"
}
]
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/senders' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": "string",
- "name": "string",
- "phoneNumber": "string",
- "senderStatus": "string",
- "deleted": true
}
]
Get Single Sms Messages
Retrieve the message with the id from path
Authorizations:
path Parameters
id required | integer <int32> The id of the message. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/messages/<integer>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": 0,
- "groupId": 0,
- "senderId": 0,
- "subscriberId": 0,
- "textBody": "string",
- "templateId": "string",
- "createDate": "2019-08-24T14:15:22Z",
- "status": "string",
- "register": true
}
Get All Sms Messages
Retrieve the list of all sms messages. Results can be filtered by messages ids, group or channel. The result will be a combination of all parameters present
Authorizations:
query Parameters
group | string Example: group=12 The name of the group to search |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
destination | string Example: destination=351-999999999 The mobile number of a recipient. |
status | string Enum: "created" "queued" "processing" "spool" "sending" "finished" "send_failed" "broken" "delivered" "rejected" "scheduled" "canceled" The status to check the message. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/sms/messages?group=<string>&dateStart=<string>&dateEnd=<string>&destination=<string>&status=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
[- {
- "createDate": "2019-08-24T14:15:22Z",
- "subscriberMobile": "string",
- "groupName": "string",
- "messageId": "string",
- "senderMobile": "string"
}
]
The push channel enables you to send messages to your mobile apps , that include the ability to receive push notifications.
The flow on how to use the push channel messaging capabilities is pretty simple. First , you create an app in our database and then , you are ready to send messages to that app, and to a specific user of that same app.
Template usage and scheduling is also available to this channel.This means that you can have pre-configured templates of messages to send to all your clients, as well as timed push messages for your needs, raging from timed campaigns or flash promotions.
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/apps' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "app_id": "YourApp",
- "name": "YourApp"
}
]
Get Single App
Retrieve a Mobile Push App
Authorizations:
path Parameters
id required | string Id of the App. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/apps/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "mobileAppId": "1234"
}
Send Single Push Message
Send a single push message to a recipient
Authorizations:
Request Body schema: application/json
default response
to required | string The contact of the recipient. format should be countryCode-phoneNumber. |
os required | string The token OS (android or ios). |
subject required | string The subject of the message. |
textBody required | string The body of the message. |
appId required | string The appId of the application. |
custom | string Any custom information to associate the message with. |
scheduleTo | string Schedule Date to send message |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
[- {
- "to": "1234",
- "os": "android",
- "subject": "Hello World",
- "textBody": "This is an Hello to the World",
- "appId": "examplepushapp",
- "custom": "This os for a test",
- "scheduleTo": "yyyy-MM-dd HH:mm:ss"
}
]
Response samples
- 201
- 400
- 401
- 403
- 500
[- {
- "messageId": "1234"
}
]
Templates are pre-defined messages that are used to ease message building and maintain coherence between topics and groups.
They are shared between multiple endpoint definitions and services (such as Multi-Channel or Alert)
Despite some differences in structure between channels, they have the subject and body already set, along with some options.
The Slingshot API
enables the user to , should he choose to, create and execute advanced templates.These templates use the template engine JTWIG
, both in template structure and code language.
When creating a template , either for email or sms channels, you can use templates (for email you can use full html templates with CSS in them, in sms , standard sms message templates). When sending either an email or an sms, you can pass a JSON data structure within the parameter advancedTemplatingData
.
Notes
See the section How To
in order to see how to use the Slingshot API
advanced template feature.
This section of Slingshot API
advanced templating will demonstrate on how to use advanced templates
in both email and sms. The aspects and code snippets below will demonstrate mostly common features and basic usage
of advanced template.
The topics we will approach here will be the following:
- Basic Replacement
- Logic integration (If/else)
- Dynamic Replacement with Objects
- Iteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example represents an example where we want to replace the name value:
"html" : "This is {{name.value}}
"
OR
"text" : "This is {{name.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "name": "Slingshot API" }
The result should be:
This is Slingshot APILogic integration (if/else)
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example illustrates the usage of logic operators in advanced templates(if/else):
"html" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
OR
"text" : "{% if flag == true %} True Value {% else %} False Value {% endif %}"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "flag": false }
The result should be:
False ValueDynamic Replacement with Objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
OR
"text" : "Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "item": { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" } }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 eurosIteration through objects
When creating a template (either for email or sms), for example, should you choose to use html
or text
,
The following example uses a data structure in order to render it inside a template (if/else):
"html" : "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
OR
"text": "{% for item in items %} Item:{{item.text.value}} Description:{{item.description.value}} Price:{{item.price.value}} {%endfor%}
"
When creating a payload to send a campaign (either via sms or email) the advancedTemplatingData
payload attribute should contain:
"advancedTemplatingData": { "items": [ { "text": "Slingshot Cap", "price": "4.95 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Shirt", "price": "25.00 euros", "description" : "The new line of items from slingshot" }, { "text": "Slingshot Pin", "price": "10.00 euros", "description" : "The new line of items from slingshot" } ] }
The result should be:
Item:Slingshot Cap Description:The new line of items from slingshot Price:4.95 euros Item:Slingshot Shirt Description:The new line of items from slingshot Price:25.00 euros Item:Slingshot Pin Description:The new line of items from slingshot Price:10.00 euros
Note
For more information regarding on how to use JTWIG templating language, please see this guide.
Code Snippets enable the use to use other templates inside a template. This joins the functionality of the JTWIG
advanced templating language with the versatility of Slingshots template creation , management and usage.
For example, if you want to create an Email template that will be the fusion of a template with customer data and another with product information, first we create the personal information template.
{
"templateName" : "CodeSnippet - Personal",
"subject" : "CodeSnippets",
"htmlBody" : "{{ firstname.value }} {{ lastname.value }} {{ age.value }} {{ height.value }} {{ address.value }}
" ,
"openTracking": false,
"clickTracking": false,
}
Next we create the product information template.
{
"templateName" : "CodeSnippet - Product",
"subject" : "CodeSnippets",
"htmlBody" : "{{ quantity.value }} {{ description.value }} {{ price.value }}
",
"openTracking": false,
"clickTracking": false,
}
Finally we create the macro template , with the position of both the previous templates plus additional information
{
"templateName" : "CodeSnippet - All",
"subject" : "CodeSnippets",
"htmlBody" : "{{ order.value }} {{ firstTemplate }} {{ secondTemplate }}
",
"openTracking": false,
"clickTracking": false,
}
After all templates have been created, when sending an email, the following attributes must be present in the payload in order to use code snippets.
[{ "senderId": "sender id", "senderName": "sender name", "to": [ "email here" ], "templateId" : "template id", "advancedTemplatingData": { "codeSnippets" : [{ "firstTemplate" : "Template_Identifier_CodeSnippet_Personal", "firstname" : "SlingShot", "lastname" : "User", "age" : 30, "height" : "1.77m2, "address" : "E-goi Street" },{ "secondTemplate" : "Template_Identifier_CodeSnippet_Product", "quantity" : 3, "description" : "E-goi Cap", "price" : "4.15euros" } ], order : 123456 } }]
The final result , the sent email will have the following:
123456 SlingShot User 30 1.77m E-goi Street 3 E-goi Cap 4.15euros
Notes
The previous examples dont have HTML code in them, put you can use it in order to create powerful templates.
The attribute codeSnippets
must be present in order to render code snippets.
When creating a codeSnippets, any word that contains either Template
or template
is reserved to be processed to get the templateId.
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/push/templates' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": 0,
- "subject": "Hello World",
- "textBody": "This is a message of Hello to the World",
- "appId": "1234",
- "templateName": "Hello World"
}
]
Create Single Push Template
Creates a new template record for Push
Authorizations:
Request Body schema: application/json
subject required | string The title of the message. |
textBody required | string The text body of the message. |
appId required | string The id of the app to associate the template. |
templateName required | string The name of the template. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "subject": "Hello World",
- "textBody": "This is a message of Hello to the World",
- "appId": "1234",
- "templateName": "Hello World"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "templateId": "1234"
}
Get Single Push Template
Gets a Push Template
Authorizations:
path Parameters
id required | string Id of the Push Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/push/templates/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 404
- 500
{- "id": 0,
- "subject": "Hello World",
- "textBody": "This is a message of Hello to the World",
- "appId": "1234",
- "templateName": "Hello World"
}
Remove Single Push Template
Removes a Push template, given a template id
Authorizations:
path Parameters
id required | string Id of the Push Template. Cannot be empty. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/push/templates/<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 Push Template
Updates an Push template, given a template id
Authorizations:
path Parameters
id required | integer <int32> Id of the Push Template. Cannot be empty. |
Request Body schema: */*
subject required | string The title of the message. |
textBody required | string The text body of the message. |
appId required | string The id of the app to associate the template. |
templateName required | string The name of the template. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request PATCH 'slingshot.egoiapp.com/api/v2/push/templates/<integer>' \ --header 'ApiKey: ' \ --header 'Content-Type: */*' \ --data-raw '{"appId":"<string>","subject":"<string>","templateName":"<string>","textBody":"<string>"}'
Get Push Report
Retrieve Push Reports and Statistics. Entries can be customizable
Authorizations:
query Parameters
group | string Example: group=12 The name of the group to search |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/push/reports?group=<string>&dateStart=<string>&dateEnd=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "id": 0,
- "status": "string",
- "title": "string",
- "body": "string",
- "appName": "string",
- "token": "string",
- "createDate": 0
}
]
Get Link Statistics
Get the statistics of a given link
Authorizations:
path Parameters
link required | string Link unique url |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/shortener/reports/<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "ip": "string",
- "userAgent": "string",
- "countryCode": "string",
- "countryName": "string",
- "postalCode": "string",
- "city": "string",
- "region": "string",
- "clickDate": "string"
}
]
Get Link Statistics by Day
Get clicks and opens by day
Authorizations:
query Parameters
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/shortener/reports?dateStart=<string>&dateEnd=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "day": "string",
- "totalOpened": 0,
- "totalCreated": 0
}
]
Get All Links
Get all created links with shortener
query Parameters
link | string Example: link=a1b2c3d Shortener Link |
originalLink | string Example: originalLink=https://www.example.com/checkout Original link |
dateStart | string Example: dateStart=2019-07-27 The date to start the report. Date must be in format |
dateEnd | string Example: dateEnd=2019-07-28 The date to end the report. Date should be in format |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/shortener?link=<string>&originalLink=<string>&dateStart=<string>&dateEnd=<string>'
Response samples
- 200
- 500
{- "domain": "string",
- "link": "string",
- "originalLink": "string",
- "name": "string",
- "createDate": 0
}
Create Single Shortener Link
Create a short link (ex. https://egoi.me/abcdefg )
Request Body schema: application/json
name | string Link name |
originalLink required | string Original link |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "name": "Your link name",
}
Response samples
- 200
- 400
- 500
{- "name": "string",
- "link": "string",
- "fullLink": "string"
}
Slingshot, the transactional communications service from e-goi, allows its users to send emails and SMS through its API or SMTP servers, and to keep detailed logs from all steps of a message's lifecycle. This feature is called Registered Message.
Our records detail dates and times, sender and recipient information, subject and content of the message and its attachments, in addition to all other events related: sent, delivery, failed reception, opening and clicks recorded - for emails.
To enable Registered Message in your account, please get in touch with our Customer Services team, through the HELP section in your e-goi interface, or simply call us.
Important
By enabling Registered, parameters openTrack and clickTrack will be forced to TRUE (as this tracking is part of the service)
This API is a service provided by E-goi to evaluate requests made to your application, evaluate and return proper ratings to those.
LADS (Login Anomaly Detection System) enables you to send specific evaluation request elements such as:
ua - user agent data from where the request was initially send from (ex: chrome)
ip - ip type from where the request was initially send from (ex: 127.0.0.1)
With these previous elements , lads will evaluate the request, against previous ones made, the evaluation is made according to level and ranges that define this level:
low - the request shares the most similarities with previous requests made ,meaning the threat level is low.
medium - the request shares some similarities with previous requests made ,meaning the threat level is medium.
high - the request doesn't share similarities with previous requests made ,meaning the threat level is high.
For more information about LADS please get in touch with our Customer Services team, through the HELP section in your e-goi interface, or simply call us.
The transactional WebHooks feature provides a convenient way to follow the thread of each message, by defining a callback URL to be invoked when the message reaches each of the stages in its lifecycle.
You can use the Create WebHook method
to configure what actions to listen to, and where to send the information.
A JSON payload with the event's details will be sent (using POST) to the configured URL.
The event JSON payload takes the form of an event list.
Several events of any stage can be sent in a single request to the callback in the form:
[
{
"actionDate": 1442484210599,
"data": {
"groupId": 1,
"recipientId": 14,
"messageId": 2156,
"createDate": 1442484203053,
"recipientEmail": "john.doe@example.com"
},
"action": "processed"
}
]
The hooks available in a mail message's lifecycle are:
State | Description | Is Final? |
---|---|---|
processed | The message was successfully processed and is ready to be sent | No |
canceled | The recipient's status doesn't allow sending | Yes |
sent | The message was successfully sent to the destination server. | No |
failed | The message failed to send because of an internal error in the SMTP | Yes |
bounce | The destination server rejected the message permanently or temporarily | Yes |
delivered | The message was delivered to the recipient | Yes (if the recipient doesnt open the email) |
view | The recipient viewed the message URLs (available only when tracking is enabled) | Yes (if recipient doesnt click on the link) |
click | The recipient clicked in any of the message URLs (available only when tracking is enabled) | Yes (if the user doesnt report the email) |
abuse | There was a complaint reported on the ISP | Yes |
The hooks available in a sms message's lifecycle are:
State | Description | Is Final? |
---|---|---|
processed | The message was successfully processed and is ready to be sent | No |
canceled | The message failed to send because of an internal error | Yes |
sent | The message was successfully sent | No |
failed | The message failed to send because of an internal error | Yes |
delivered | The message was successfully delivered to it's destination | Yes |
notdelivered | The message was not delivered to it's destination | Yes |
Get All Webhooks
Return all Webhooks defined by the user
Authorizations:
query Parameters
channel | string The channel of the groups. Can be |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/webhooks?channel=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 400
- 401
- 403
- 500
[
]
Create new Webhook
Create a new Webhook
Authorizations:
Request Body schema: application/json
default response
url required | string The url to send the Events. |
channel required | string Value: "email" The channel of the webhook. |
actions | Array of strings Items Enum: "processed" "failed" "sent" "canceled" "click" "view" "remove" "bounce" "abuse" A list of the actions to capture. |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "url": "www.your-server/webhook/events",
- "channel": "email",
- "actions": [
- "processed"
]
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "webhookId": "1234"
}
Remove Webhook
Remove a Webhook
Authorizations:
query Parameters
url required | string url to be cleaned from the webhooks. |
channel | string The channel of the Webhook. Can be |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/webhooks?url=<string>&channel=<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."
}
Get All Groups
Retrieve all groups to sort messages
Authorizations:
query Parameters
channel | string The channel of the groups. Can be |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/groups?channel=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 400
- 401
- 403
- 500
[- {
- "id": "string",
- "name": "string",
- "channel": "string"
}
]
Cancel Single Scheduled Message
Cancel a Scheduled Message
Authorizations:
path Parameters
id required | string Id of the Message to cancel the send. |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'slingshot.egoiapp.com/api/v2/messages/<string>/action/cancel' \ --header 'ApiKey: '
Response samples
- 400
- 401
- 403
- 500
{- "title": "Bad Request",
- "status": 400,
- "detail": "The request could not be understood by the server due to malformed syntax. The client should revise the request and try again."
}
Get Subscriber Information
Retrieve Subscriber Information
Authorizations:
query Parameters
string Example: email=12 Subscriber Email | |
mobile | string Example: mobile=month Subscriber mobile number |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/subscribers?email=<string>&mobile=<string>' \ --header 'ApiKey: '
Response samples
- 200
- 401
- 403
- 500
[- {
- "subscriptionDate": "string",
- "subscriptionStatusMail": "string",
- "subscriptionStatusSms": "string",
- "subscriptionType": "string",
- "email": "string",
- "mobile": "string"
}
]
Mobile Validator
Checks if a phone number is valid. Can be either land line or mobile
Request Body schema: application/json
number required | string Mobile Number |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "number": "351-987654321"
}
Response samples
- 200
- 400
- 500
{- "prefix": "351",
- "number": "987654321",
- "valid": false,
- "message": "The number is not valid."
}
Ping API
Send an innocuous request to the API, in order to confirm its working as intended
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'slingshot.egoiapp.com/api/v2/utilities/ping'
Response samples
- 200
- 500
{- "apiStatus": "Up",
- "date": "Fri Jan 17 11:20:07 WET 2020"
}
HTML to PDF converter
Converts an HTML input (either via html string or url) to a PDF returned at base 64. Before using, please validate if your HTML content isdone accordingly to the best standards HERE
Request Body schema: application/json
html | string Html String |
url | string Url to the html file |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "html": "<html_here>",
- "url": "your_url_here"
}
Response samples
- 200
- 400
- 500
{- "pdfData": "<base64_string>"
}
Sms Length Calculator
Calculates the sizes of an Sms text
Request Body schema: application/json
message required | string SMS Text String |
gsm0338 required | boolean Enable/Disable GSM0338 |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "message": "message",
- "gsm0338": false
}
Response samples
- 200
- 400
- 500
{- "gsm0338": true,
- "charCount": 10,
- "parts": 1,
- "charPerMessage": 30,
- "message": "sms text message"
}
Email Validator
Validates status and heath of the email address
Request Body schema: application/json
email required | string Email Address |
isMx | boolean Enable, disable MX validation |
isTemporaryEmail | boolean Enable, disable temporary email validation |
isDeepMx | boolean Enable, disable Deep MX validation |
isInboxCheck | boolean Test if the inbox is used |
isFreemail | boolean Enable, disable freemail validation |
validateDomain | boolean Enable, disable domain validation |
Responses
Request samples
- Payload
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
{- "email": "example@example.com",
- "isMx": false,
- "isTemporaryEmail": false,
- "isDeepMx": false,
- "isInboxCheck": false,
- "isFreemail": false,
- "validateDomain": false
}
Response samples
- 200
- 400
- 500
{- "emailValid": "true",
- "emailTemporary": "true",
- "mx": "true",
- "deepMx": "true",
- "inboxCheck": "true",
- "freemail": "true",
- "typo": "true",
- "correctSyntax": "true"
}