APIv3 (New) (3.0.0)
Introduction
This is our new version of API. We invite you to start using it and give us your feedback
This is our new version of API. We invite you to start using it and give us your feedback
E-goi can be integrated with many environments and programming languages via our REST API. We've created a developer focused portal to give your organization a clear and quick overview of how to integrate with E-goi. The developer portal focuses on scenarios for integration and flow of events. We recommend familiarizing yourself with all of the content in the developer portal, before start using our rest API.
The E-goi APIv3 is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters.
BaseURL = api.egoiapp.com
This API supports 5 HTTP methods:
- GET: The HTTP GET method is used to read (or retrieve) a representation of a resource.
- POST: The POST verb is most-often utilized to create new resources.
- PATCH: PATCH is used for modify capabilities. The PATCH request only needs to contain the changes to the resource, not the complete resource
- PUT: PUT is most-often utilized for update capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource.
- DELETE: DELETE is pretty easy to understand. It is used to delete a resource identified by a URI.
We use a custom authentication method, you will need a apikey that you can find in your account settings. Below you will see a curl example to get your account information:
#!/bin/bash
curl -X GET 'https://api.egoiapp.com/my-account'
-H 'accept: application/json'
-H 'Apikey:
Here you can see a curl Post example with authentication:
#!/bin/bash
curl -X POST 'http://api.egoiapp.com/tags'
-H 'accept: application/json'
-H 'Apikey:
-H 'Content-Type: application/json'
-d '{name
:Your custom tag
,color
:#FFFFFF
}'
Stream limits are security mesures we have to make sure our API have a fair use policy, for this reason, any request that creates or modifies data (POST, PATCH and PUT) is limited to a maximum of 20MB of content length. If you arrive to this limit in one of your request, you'll receive a HTTP code 413 (Request Entity Too Large) and the request will be ignored. To avoid this error in importation's requests, it's advised the request's division in batches that have each one less than 20MB.
Timeouts set a maximum waiting time on a request's response. Our API, sets a default timeout for each request and when breached, you'll receive an HTTP 408 (Request Timeout) error code. You should take into consideration that response times can vary widely based on the complexity of the request, amount of data being analyzed, and the load on the system and workspace at the time of the query. When dealing with such errors, you should first attempt to reduce the complexity and amount of data under analysis, and only then, if problems are still occurring ask for support.
For all these reasons, the default timeout for each request is 10 Seconds and any request that creates or modifies data (POST, PATCH and PUT) will have a timeout of 60 Seconds. Specific timeouts may exist for specific requests, these can be found in the request's documentation.
A callback is an asynchronous API request that originates from the API server and is sent to the client in response to a previous request sent by that client.
The API will make a POST request to the address defined in the URL with the information regarding the event of interest and share data related to that event.
[Go to callbacks documentation]
Note: Only http or https protocols are supported in the Url parameter.
Get all automations
Returns all automations
Authorizations:
query Parameters
automation_id | integer Reference attribute to automation id |
title | string Reference attribute to title |
created_by | integer Reference attribute to created by |
list_id | integer (ID) >= 1 Example: list_id=1 ID of the list that owns the automation |
status | string Enum: "active" "inactive" Automation status |
offset | integer >= 0 Element offset (starting at zero for the first element) |
limit | integer [ 1 .. 100 ] Default: 10 Number of items to return |
order | string Default: "desc" Enum: "asc" "desc" Type of order |
order_by | string Default: "automation_id" Enum: "automation_id" "title" "list_id" "created_by" Reference attribute to order automations |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request GET 'api.egoiapp.com/automations?automation_id=<integer>&title=<string>&created_by=<integer>&list_id=<integer>&status=<string>&offset=<integer>&limit=10&order=desc&order_by=automation_id' \ --header 'Apikey: <YOUR_APIKEY>'
Response samples
- 200
- 401
- 403
- 408
- 422
- 429
- 500
- 503
{- "total_items": 1,
- "items": [
- {
- "automation_id": 1,
- "title": "Example Automation",
- "list_id": 1,
- "status": "active",
- "created_by": 1,
- "allow_multiple_contacts": true,
- "contact_limit": 10,
- "created": "YYYY-MM-DD",
- "updated": "YYYY-MM-DD"
}
]
}
Remove automation
Remove automation information given its ID
Authorizations:
path Parameters
automation_id required | integer (ID) >= 1 Example: 1 ID of the Automation |
Responses
Request samples
- cURL
- C#
- Java
- JavaScript
- PHP
- Python
- Ruby
curl --location --max-time 30 --request DELETE 'api.egoiapp.com/automations/<integer>' \ --header 'Apikey: <YOUR_APIKEY>'
Response samples
- 401
- 403
- 404
- 408
- 409
- 429
- 500
- 503
{- "title": "Unauthorized",
- "status": 401,
- "detail": "The request has not been applied because it lacks valid authentication credentials for the target resource"
}
Get all Campaigns
Returns all campaigns
Authorizations:
query Parameters
channel | string Enum: "email" "push" "sms" "smart_sms" "voice" "web_push" Channel of the campaign |
campaign_hash | string Hash of the campaign |
list_id | integer ID of the list where the campaign belongs |
status | string Enum: "draft" "canceled" "queued" "paused" "sending" "sent" Status of the campaign |
internal_name | string Internal name of the campaign |
created_by | integer ID of the user who created the campaign |
group_id | integer ID of the group where the campaign belongs |
created_min | string <date-time> (date_time) Example: created_min=YYYY-MM-DD hh:mm:ss Created initial date |
created_max | string <date-time> (date_time) Example: created_max=YYYY-MM-DD hh:mm:ss Created finish |
updated_min | string <date-time> (date_time) Example: updated_min=YYYY-MM-DD hh:mm:ss Updated initial |
updated_max | string <date-time> (date_time) Example: updated_max=YYYY-MM-DD hh:mm:ss Updated finish |
start_date_min | string <date-time> (date_time) Example: start_date_min=YYYY-MM-DD hh:mm:ss Start date initial |
start_date_max | string <date-time> (date_time) Example: start_date_max=YYYY-MM-DD hh:mm:ss Start date finish |
end_date_min | string <date-time> (date_time) Example: end_date_min=YYYY-MM-DD hh:mm:ss End Date initial |
end_date_max | string <date-time> (date_time) Example: end_date_max=YYYY-MM-DD hh:mm:ss End Date finish |
schedule_date_min | string <date-time> (date_time) Example: schedule_date_min=YYYY-MM-DD hh:mm:ss Schedule Date initial |
schedule_date_max | string <date-time> (date_time) Example: schedule_date_max=YYYY-MM-DD hh:mm:ss Schedule Date finish |
offset | integer >= 0 Element offset (starting at zero for the first element) |
limit | integer [ 1 .. 100 ] Default: 10 Number of items to return |
order | string Default: "desc" Enum: "asc" "desc" Type of order |
order_by | string Default: "created" Enum: "list_id" "internal_name" "created_by" "group_id" "created" Reference attribute to order campaigns |