Appendix
Errors
The REST API responds to each request with an HTTP response code. In case of a problem, the
system responds with a list of errors.
Response
Name |
Type |
Description |
errors |
list<errors> |
List of errors
(see Errors object below)
|
Errors
Name |
Type |
Description |
timestamp |
string |
Timestamp value |
path |
string |
URL of the requested method |
method |
string |
Request method type |
status |
integer |
Bad response status.
- 4xx error status codes indicate an error because of the information provided
- 5xx error status codes indicate server errors
|
message |
string |
Detailed error message |
code |
integer |
Specific error codes |
Success Status Codes
Name |
Status |
Description |
200 |
OK |
The request was successfully completed |
201 |
Create |
A new resource was successfully created |
202 |
Accepted |
The request was accepted |
204 |
No Content |
The server has fulfilled the request but does not need to return a response body |
Success Status Codes
Name |
Status |
Description |
400 |
Bad Request |
The request cannot be understood by the server due to incorrect syntax |
401 |
Unauthorized |
Indicates that the request requires user authentication information |
403 |
Forbidden |
Unauthorized request. The client does not have access rights to the content |
404 |
Not Found |
The server cannot find the requested resource |
405 |
Method Not Allowed |
The request HTTP method is known by the server but has been disabled and cannot be used for that resource |
409 |
Conflict |
The request could not be completed due to a conflict with the current state of the resource |
412 |
Precondition Failed |
The client has indicated preconditions in its headers which the server does not meet |
413 |
Payload Too Large |
Request entity is larger than limits defined by serve |
414 |
URI Too Long |
The URI requested by the client is longer than the server can interpret |
415 |
Unsupported Media Type |
The media type in Content-type of the request is not supported by the server |
429 |
Too Many Requests |
The user has sent too many requests in a given amount of time |
Server Error Codes
Name |
Status |
Description |
500 |
Internal Server Error |
The server encountered an unexpected condition which prevented it from fulfilling the request |
503 |
Service Unavailable |
The server is not ready to handle the request |
504 |
Gateway Timeout |
The server is acting as a gateway and cannot get a response in time for a request |
Error Codes
API error codes are four-digit integers (xxxx). The first digit is allocated for the API version, so for
the first version, the code format will be 1xxx. The second digit specifies which segment error is
related to (for example, message - 15xx). The last two digits specify the exact problem.
Generic
Code |
Code Description |
1001 | Invalid value is provided |
1002 | Invalid URL is provided |
1003 | Invalid page size is provided, an integer in the range of 1 to 50 should be given/td> |
1004 | Invalid page token is provided. The token should be a text value retrieved from the API |
1005 | Invalid JSON body |
1006 | Not enough funds |
1007 | Request data is missing |
1009 | Invalid Page Token |
1012 | Method not allowed |
1013 | Payload is too large |
1014 | URL is too long |
1015 | Unsupported media type |
1029 | Too many requests |
Headers
API accepts headers in the request and sends responses with headers as metadata.
Request headers
Name |
Type |
Description |
Content-Type |
string |
Content type of the payload, always expects application/json |
X-Dexatel-Key |
string |
Authorization key |
Response headers
Name |
Type |
Description |
Location |
string (URL) |
Absolute path of newly created object |
Content-Type |
string |
Content-type of the payload, which always sends application/json |
Total-Count |
integer |
Total count of the records |
Response headers
Name |
Type |
Description |
X-Dexatel-Signature |
string |
Webhook’s payload signed with a secret |
Limits
The following limits apply for the API.
Request
Name | Limit |
APS | 10 |
APM | 100 |
APH | 1000 |
payload | 10 KB |
media | 1 MB |
Type
Name | Limit |
string | 1024 symbols (UTF8) |
integer | 1 to 1.000.000 |
number | 1 to 1.000.000,00 |
Custom
Name | Limit |
webhook | 10 |
template | 1.000 |
audience | 1.000 |
contact in an audience | 10.000 |
sender | 1000 |
message (active) | 1.000.000 |
campaign (active) | 1.000 |
campaign (scheduled) | 10 |
recipient | 10 |
page | 100 |
Attribute Types
The following string attribute types are used throughout the API:
Name |
Description |
Example |
uuid |
8-4-4-4-12 format string consisting of hex characters (0-f) |
01b620c7-8381-4cbf-995c-87456ae04830 |
date |
UTC time |
YYYY-DD-MM HH:MM:SS |
url |
URL starting with http or https |
https://www.google.com |
did |
Up to 15 digits string, consisting of numbers only.
The spaces, dashes and the plus at the beginning to be ignored
|
18001234567 |
identifier |
Object name used as an identifier.
Consists of letters, numbers, dashes and underscores
|
company-intro-template |
name |
Informative object name. Consists of letters,
numbers, spaces, and allowed characters (. , : * _ ! ? % # + - = @ _ [ ] { } ())
|
late campaign 27/09 |
template |
Template text with variables. Contains at
least one variable value.
Possible variable values are:
- {first_name}
- {last_name}
- {date}
- {timestamp}
- {code}
|
hi {first_name}, you have an appointment at {timestamp}
|
Uniqueness Constraints
Object attribute values are unique in some scope. When the uniqueness is attempted to be broken by an
API request, the 409 error status code is expected to be returned.
Name |
Description |
object ID (uuid) |
Is unique for all accounts |
sender code |
Is unique for all accounts |
template name |
Is unique in the scope of the account. The account cannot have more than one template with
the same name
|
audience name |
s unique in the scope of the account.
The account cannot have more than one audience with the same name
|
sender name |
Is unique in the scope of the channel and account. Sender name is unique for each channel
and account
|
contact |
Is unique in the scope of the audience and the account. A contact cannot be added in the
same audience more than once
|