Your first API request
Go from an API key to your first request, then send an email from a mailbox you control.
503 integrations_disabled. These examples describe the enabled API.Create a credential
Open Account → Integrations. Authorize the mailboxes you need, then create a REST API credential with the required permissions and selected mailboxes.
Copy the secret when it appears. It is shown once. Save it as a server environment variable and keep it outside source control.
export CHERRYMAIL_API_KEY='your-cm_rest_-credential'Make your first request
Retrieve your account with read permission. All endpoints use the base URL https://cherrymail.net/api/v1 and a Bearer authorization header.
curl 'https://cherrymail.net/api/v1/account/' \
-H "Authorization: Bearer $CHERRYMAIL_API_KEY"Successful JSON responses wrap the result in data and include a request_id for troubleshooting.
Send an email
Use a credential with send permission and a current grant for the selected mailbox. Replace 123 with your mailbox ID. The sender must match the granted mailbox identity.
curl -X POST 'https://cherrymail.net/api/v1/mailboxes/123/send/' \
-H "Authorization: Bearer $CHERRYMAIL_API_KEY" \
-H "Idempotency-Key: example-request-1042" \
-H "Content-Type: application/json" \
-d '{
"to": [
"recipient@example.com"
],
"subject": "Hello from CherryMail",
"text": "Your first email, sent with the CherryMail API."
}'Use a unique Idempotency-Key for each intentional submission. Reuse the same key and unchanged request when checking a retry.
Track the result
Creation and change requests return a durable operation_id. Retrieve the operation to follow its state and result.