Introduction
Our API interface is used to integrate SendPulse’s distribution service capabilities with client’s personal projects.
The API is designed for developers and is accompanied with a detailed documentation.
Webhooks are available by request. Please contact us at [email protected] if you would like to have them enabled for your account.
Wrappers for SendPulse API and code samples
Description
SendPulse’s REST API service works over the HTTP protocol and is essentially a set of methods that are used to perform requests and receive responses for each operation.
All answers return in the form of JSON structures.
Rate limit is 3 requests per second.
SendPulse API wrappers
The latest versions of SendPulse API wrappers are available at GitHub.
Main URL
All references to API requests in this document include the compulsory basic URL:
Authorization
The authorization process is only possible when preceded by a private key, which, in future, should be referenced in each request to the API.
The necessary parameters to obtain the key can be found in the private account settings page found on the following URL
https://login.sendpulse.com/settings in the API tab.
The following parameters are used:
| grant_type | has to be equal to client_credentials |
| client_id | your ID (API) |
| client_secret | your secret (API) |
To get the key you have to send a POST request to:
| https://api.sendpulse.com/oauth/access_token |
A sample response:The resulting key is valid for 1 hour and does not require additional requests with each operation. Before the key expires you will need to send a request for a new one.
{
"access_token": "tf4Si1LydYpTAPyHXUgjig72jlrd5HpIJL5oigmc",
"token_type": "Bearer",
"expires_in": 3600
}
A sample key:
Authorization: Bearer tf4Si1LydYpTAPyHXUgjig72jlrd5HpIJL5oigmc
Error codes and description
| Error code | Description |
| 8 | No data |
| 10 | Sender email address missing |
| 11 | Can’t find recipients addresses |
| 13 | Empty email message content field |
| 14 | Can’t find email address with a specified ID |
| 17 | Can’t find email address |
| 19 | Email address already exists |
| 20 | Don't use free mail services |
| 21 | No such email address awaiting activation |
| 97 | Invalid email address type. Don't use free mail services |
| 201 | Empty mailing list name |
| 203 | This mailing list name already exists |
| 213 | Mailing list not found |
| 303 | Can’t find email addresses in the mailing list |
| 400 | Specified SMTP user doesn’t exist. Create an SMTP account |
| 502 | Can’t find email address |
| 602 | Can’t find campaign. Probably, it has already been sent |
| 701 | Sender email (address) or name not specified |
| 703 | Can’t find mailing list |
| 704 | Can’t find sender |
| 707 | Account balance exceeded |
| 711 | Wait 15 minutes before sending to the same list again |
| 720 | Empty subject field |
| 721 | Email message empty |
| 722 | Mailing list ID not specified |
| 799 | Incorrect date format. Use YYYY-MM-DD hh:ii:ss that equals or is more than current date |
| 800 | Invalid operation |
| 802 | Campaign not found |
| 901 | Sender name not specified |
| 902 | Selected email address already in use |
| 903 | Sender email address not specified |
| 904 | Email address blacklisted |
| 905 | Sender address quota reached |
| 906 | Email address syntax error |
| 1101 | Email address not specified |
| 1003 | Specified sender doesn’t exist |
| 1004 | Activation code has been sent. Wait 15 minutes to retry |
| 1005 | Error sending confirmation |
| 1104 | Activation code not specified |
Registrarse con
Facebook