Why You Need an API
API (Application Programming Interface) is functionality that enables interaction between different applications. For humans, there are separate interfaces, such as a website. APIs are used for various integrations. Sender Solutions provides an API that works via HTTP requests in JSON format. Access to the API is available for all project pricing plans, including the free plan. You can use the Sender Solutions API for more complete and flexible integration. A typical usage scenario for the API is from your website, based on triggers. For example, when a subscriber is created on your website, your site sends an API request, and a subscriber with the same data is created in Sender Solutions.
Getting Started with the API
- To use the API, you need to create a project in the Sender Solutions Dashboard.
- Next, on the project settings page, create an API key. This is a unique access key to the API at the project level. Keep it secure. If you suspect that the key has been compromised, start using a new key as soon as possible, and deactivate or delete the compromised key.
- You can create multiple API keys for a single project, and all of them are equivalent. This can be useful if you have several different applications that will make API requests.
- The API key must be passed in the HTTP header Authorization.
- Send the request body in JSON format, and set the Content-Type header to application/json.
- Pay attention to the HTTP status code in the response. If the code is 200, everything is fine. If the code is 500, an error has occurred.
- The API response will generally be returned in JSON format. At the root level, there will be a "success" key with possible values true / false.
Example of a successful response:{
"success": true
}
Example of an error response:{
"error": "Some error description",
"success": false
}
A successful response body may contain additional data depending on the specific request. - Working with the API does not require support for cookies or sessions.
Useful Resources
Links to useful tools for working with the API will be added here soon, including a Postman request collection and a Composer package for working with the API in PHP. Check back in about a week.