Understand the basics of SendPost REST convention and common parameters
/api/v1/subaccount
or /api/v1/account
in their API call resource path based on who is authorised for the resource. All API calls with path /api/v1/subaccount
use X-SubAccount-ApiKey
in their request header. Likewise all API calls with path /api/v1/account
use X-Account-ApiKey
in their request header.domain
instead of domains for domain resource endpoint. Likewise we have sender
instead of senders for sender resource endpoint.2xx
range indicate success.4xx
range indicate an error owing due to unauthorize access, incorrect request parameters or body etc.5xx
range indicate an eror with SendPost’s servers ( internal service issue or maintenance )created
in UNIX nano epoch timestamp.X-SubAccount-ApiKey: AHEZEP8192SEGH
This API key is used for all Sub-Account level operations such as:
X-SubAccount-ApiKey
you also have another API Key X-Account-APIKey
which is used for Account level operations such as :
X-SubAccount-ApiKey
is required or X-Account-ApiKey
Code | Reason | Details |
---|---|---|
200 | Success | Everything went well |
401 | Unauthorized | Incorrect or missing API header either X-SubAccount-ApiKey or X-Account-ApiKey |
403 | Forbidden | Typically sent when resource with same name or details already exist |
406 | Missing resource id | Resource id specified is either missing or doesn’t exist |
422 | Unprocessable entity | Request body is not in proper format |
500 | Internal server error | Some error happened at SendPost while processing API request |
503 | Service Unavailable | SendPost is offline for maintenance. Please try again later |
X-SubAccount-ApiKey
header with every API call.
The Account API operations allow users to manage multiple sub-accounts and manage IPs. A single parent SendPost account can have 100’s of sub-accounts. You may want to create sub-accounts for different products your company is running or to segregate types of emails or for managing email sending across multiple customers of yours.
username
and password
from your SendPost account.smtp.sendpost.io
. This setting is sometimes referred to as the external SMTP server or the SMTP relay.username
and password
.587
(or as specified below).25
, 2525
or 587
.465
smtp.sendpost.io
on port 25, 587, or 2525, issues an EHLO command, and waits for the server to announce that it supports the STARTTLS SMTP extension. The client then issues the STARTTLS command, initiating TLS negotiation. When negotiation is complete, the client issues an EHLO command over the new encrypted connection, and the SMTP session proceeds normally.