Getting started with the Email API
Cakemail's Email API enables you to seamlessly integrate email functionalities into your applications. This guide will walk you through the essential steps to send your first email using the API.
Obtain Your Access Token
To interact with the Cakemail API, you'll need an access token. This token authenticates your requests. You can obtain it by making a POST request to the /token endpoint with your Cakemail username and password.
shell
A successful response will provide an access token, which you'll use in subsequent API calls.
Key Notes
- Cakemail API tokens are private and must be securely stored, only accessible to your backend application.
Create a Sender
A confirmed Sender is required to send emails with the Email API.
shell
Key Notes
- If the sender email matches your account's email, it will be auto-confirmed.
- Otherwise, a confirmation email will be sent, and the recipient must click the activation link.
Find your List ID
Contact Management is provided by the Cakemail Contact List feature, therefore a List must be used to send email with the Email API. Find your default List ID or create a new List.
shell
Send your first Email
Now that you have a confirmed sender, you can submit an email using the /v2/emails endpoint.
shell
Example Response
json
Check Email Status (Optional)
You can follow the email status using the /v2/emails/
shell