comecerodocs

Send an email

POST
/notifications

Builds an email from one of your templates and your data, and sends it now to one address. Use it for emails Comecero has no notification type for. It is not saved: the answer has no notification_id and the email is not listed later, and a failed send is not retried. Only a live account may call it (422 before your account is live). The from address must be one of your verified notification addresses. Answers 200, not 201. Secret and trusted tokens may call it; a limited token may not (403).

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Request Body

application/json
  1. body

An email to send now, built from one of your templates.

method*"email"

How to send. Only email.

Value in"email"
destination*string

The one address to send to.

Formatemail
from*string

The sender address. It must be one of your verified notification addresses (Settings, General), or the request fails with 400.

Formatemail
from_name?|

The sender name.

reply_to*string

The reply-to address. Required.

Formatemail
subject?|

The subject line, sent as is.

template_id*string

The id of a template in your account that builds the body.

data*

The values the template reads, at most 50,000 characters as JSON. Your account's details are added as account unless you send your own.

Response Body

The email that was sent. url, notification_id, type, data, notification_subscription and customer are null.

application/json
  1. response

One email Comecero sent, or will send, to a customer because a notification subscription matched. Notifications are kept for 120 days (15 days in test mode).

object?"notification"

Always notification.

Value in"notification"
url?|

The URL of this notification in the API. null on one sent with POST /notifications.

Formaturi
notification_id?|

The notification id. null on one sent with POST /notifications, which is not saved.

test?boolean

true for a test mode notification.

account_id?string

The account that sent it.

type?|

The kind of email. null on one sent with POST /notifications.

method?"email"

How it was sent. Only email today.

Value in"email"
from?|

The sender address. notification@comecero.com unless the subscription names one of your verified addresses.

from_name?|

The sender name. Defaults to your public company name.

reply_to?|

The reply-to address. When the subscription sets none and the email goes from Comecero's address, your support email is used.

bcc?|

Addresses that got a blind copy, comma-separated.

destination?|

Who it went to: the customer's email, plus the billing address email when that is different (separated by ;).

subject?|

The subject line, after placeholders were filled in.

notification_subscription?||

The notification subscription that sent it: its URL, or the full object with expand=notification_subscription. Left out when the token may not read notification subscriptions.

customer?||

The customer it was sent to: a URL, or the full object with expand=customer. Left out when the token may not read customers.

status?string

queued: not sent yet (an order confirmation waits here until every license key in the order is assigned). delivered: sent. retry: the last attempt failed and another is planned. failed: no more attempts.

Value in"queued""delivered""retry""failed"
date_created?string

When the notification was made.

Formatdate-time
date_modified?string

When it last changed, for example at its last send attempt.

Formatdate-time
data?|

The data the template was filled with: the order, payment, customer and account the email is about.

body?|

The HTML that was sent. In a list this holds a short note instead; get the notification by id to read the body.

retry_count?integer

How many automatic retries were made. Only with debug=true on a single notification.

date_last_delivery_attempt?|

When it was last tried. Only with debug=true on a single notification.

Formatdate-time
date_next_delivery_attempt?|

When the next attempt is planned. Only with debug=true on a single notification, and only when one is planned.

Formatdate-time
last_failure_meta?|

Why the last attempt failed. Only with debug=true on a single notification.

formatted?

Dates as display text. Only returned with formatted=true.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/notifications' \  -H 'Content-Type: application/json' \  -d '{  "method": "email",  "destination": "john@example.com",  "from": "orders@example.com",  "from_name": "Example Shop",  "reply_to": "support@example.com",  "subject": "Your download is ready",  "template_id": "1102500900112TEm5Jc3Rw",  "data": {    "customer": {      "first_name": "John"    },    "download_url": "https://example.com/downloads/abc123"  }}'
Example Response
{  "object": "notification",  "url": null,  "notification_id": null,  "test": false,  "account_id": "AB1234",  "type": null,  "method": "email",  "from": "orders@example.com",  "from_name": "Example Shop",  "reply_to": "support@example.com",  "bcc": null,  "destination": "john@example.com",  "subject": "Your download is ready",  "notification_subscription": null,  "customer": null,  "status": "delivered",  "date_created": "2026-11-07T15:10:00Z",  "date_modified": "2026-11-07T15:10:00Z",  "data": null,  "body": "<p>Hi John, your download is ready: https://example.com/downloads/abc123</p>"}