Guides & Tutorials

Common principles

Requests must always be sent over a secure connection (HTTPS). Unsecure requests are redirected to HTTPS and will fail.

Response will be always given in JSON format. Please note that response Content-Type is still

text/html
text/html.

Every request must be authenticated.

Rate limiting

API requests are limited to up to 5 API requests per second per IP-address. When the limit is exceeded a HTTP 429 Too Many Requests error is returned and API request is not processed.

Request format

POST requests can be sent in either

application/x-www-form-urlencoded
application/x-www-form-urlencoded or JSON. If you send you content as JSON you have to make sure that Content-Type header is set to
application/json
application/json as well. JSON format is recommended.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \
-d "email=subscriber%40domain.tld" \
"https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \ -d "email=subscriber%40domain.tld" \ "https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \
  -d "email=subscriber%40domain.tld" \
  "https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \
-H "Content-Type: application/json" \
-d '{"email": "subscriber@domain.tld"}' \
"https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \ -H "Content-Type: application/json" \ -d '{"email": "subscriber@domain.tld"}' \ "https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"
$ curl -X POST -u "${USERNAME}:${PASSWORD}" \
  -H "Content-Type: application/json" \
  -d '{"email": "subscriber@domain.tld"}' \
  "https://${SUBDOMAIN}.sendsmaily.net/api/contact.php"