SendHub.net

API Documentation Log in

API Documentation

Client Libraries

The following client libraries are available:

Endpoint

The API endpoint is https://api.sendhub.net/v1

Authentication

Every request to the API must include three basic parameters:

Methods

POST /emails (eg. https://api.sendhub.net/v1/emails)

Parameters:

  • from - must match a valid 'From' address on a SendHub Sending Profile
  • to - a valid 'To' email address
  • subject - the email subject
  • body - the email body
  • content_type optional; defaults to 'text/plain'
  • notification_url optional; the url to send delivery notifications to

Response: The response will be a JSON array eg:

  • {"from":"me@example.com","status":"received","to":"you@example.com","id":"f9ad0c234422c93"}

GET /emails/<id> (eg. https://api.sendhub.net/v1/emails/f9ad0c234422c93)

Parameters:

  • None

Response: The response will be a JSON array eg:

  • {"from":"me@example.com","status":"sent","to":"you@example.com","id":"f9ad0c234422c93"}

Errors

If an error occurs, the JSON response will include an error element eg:

Notifications

If you specify the notification_url when sending an email we will send notifications back to you at that URL via a HTTP POST. Here is an example: