Get Started with Transactional Messaging API
-
For transactional emails:
- In Content Builder, create the email message content to send.
- In Email Studio, either create a list to manage recipient data or apply the recipient details to all subscribers.
-
For transactional SMS:
- In MobileConnect, set up a keyword for your transactional short code.
-
In Installed Packages, create an API integration to get a client ID and client secret. Use the following email permissions settings for the API integration: write, read, and send. Use the following SMS permissions settings for the API integration: write, read, and send.
Ensure that your client ID and secret are stored securely. Never expose this information on the client side via JavaScript or store it in a mobile application.
Tip: To save the attributes sent in the API request, create a triggered send data extension in Email Studio.
- Get an access token to generate API requests: Server-to-server integrations and web and public app integrations. To authenticate all your API requests, use an access token. You can reuse the access token for multiple requests before it expires.
- Set up an email send definition via the API. The send definition contains the message template and delivery configuration. You must reference a send definition with each message API request.
- Send a transactional email. Send your email to one or more recipients when triggered by an API.
- Create an optional subscription. A subscription uses a webhook to send you analytics in real time about whether emails are sent, not sent, or bounced.
- Get an access token to generate API requests: Server-to-server integrations and web and public app integrations. To authenticate all your API requests, use an access token. You can reuse the access token for multiple requests before it expires.
- Set up a transactional SMS definition via the API. The send definition contains the message template and delivery configuration. We recommend that you set up a definition for each messaging use case, such as one for two-factor authentication and one for order confirmations. You must reference a send definition with each outbound SMS send API request.
- Send a transactional SMS. Send your SMS to one or more recipients when triggered by the API.
- Create an optional subscription. A subscription uses a webhook to send you analytics in real time about whether SMS messages are sent, not sent, or bounced.