To test requests using your account, replace the sample API key with your actual API key.Transactional emails are triggered by your own site or app, typically in response to a user's action, such as an order confirmation or a plan renewal.
Provide your API key as the basic auth username value. If you need to authenticate via bearer auth (e.g., for a cross-origin request), use flag to pass basic auth credentials (adding a colon after your API key prevents c URL from asking for a password).
A sample test API key is included in all the examples on this page, so you can test any example right away.
To make the API as explorable as possible, accounts have test mode and live mode API keys.
There is no "switch" for changing between modes, just use the appropriate key to perform a live or test transaction.
We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code).
JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.