Introduction
Understand the basics of SendX REST convention and common parameters
Base URL
The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
The SendX Rest API doesn’t support bulk updates. You can work on only one object per request.
All requests contain the following base URL
You can also import the postman collection as well.
Authentication
The SendX API uses API key to authenticate requests. You can checkout your API key from your settings page https://app.sendx.io/setting/connectors/api under the section Team Api Key
.
SendX expects the API key to be included in all API requests to the server in a header that looks like the following:
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Response Codes
SendX uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a failed resource search, etc.). Codes in the 5xx range indicate an error with SendX’s servers (drop us a mail at support@sendx.io in case that ever happens). Here’s some error codes and what they mean:
Status Code | Reason | Description |
---|---|---|
400 | Bad Request | The request could not be understood by the server due to malformed syntax. |
401 | Unauthorized | The request requires user authentication, e.g., due to missing or invalid authentication token. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. |
404 | Not Found | The requested resource could not be found. |
406 | Not Acceptable | The requested format is not supported by the requested method. |
422 | Unprocessable Entity | The server understood the request, but the request is semantically erroneous (e.g., a request may contain a malformed email address). |
500 | Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request. |
Identifiers
SendX allows user manupilations through ids within the entire REST API, to ensure developer ease, each resource has a prefixed id. Here’s an example of all the types of ids:
IDs | Resource |
---|---|
contact_xxxxxxxx | Contact |
list_xxxxxxxx | List |
tag_xxxxxxxx | Tag |
campaign_xxxxxxxx | Campaign |
field_xxxxxxxx | Custom Field |
webhook_xxxxxxxx | Webhook |
sender_xxxxxxxx | Sender |