Skip to content

Email deliveries ​

A delivery is one email to one recipient. Transactional deliveries are created by Send email; lifecycle deliveries are created by an enabled sequence. Every endpoint below takes projectId as a query parameter with an API key. The Node.js client @funnelsgrove/emails sends it from the projectId option, and fgrove email from --project-id or FUNNELSGROVE_PROJECT_ID.

Delivery status is queued, sent, failed or unknown. Sent means accepted by the provider, not guaranteed inbox placement.

Send email ​

Queues a published template for delivery. Follow the email sending policy before sending to your audience.

Scope: email_deliveries:write

Request ​

http
POST /email/deliveries
Content-Type: application/json
Idempotency-Key: <unique-key>

Idempotency-Key is required: 1 to 200 characters from A-Z a-z 0-9 . _ : -. Reuse it when retrying the same logical send.

Parameters ​

FieldRequiredPurpose
templateYesSlug of a published template.
toYesRecipient address.
variablesYesA value per declared template variable: string, number or boolean. Send {} when the template declares none.
ccNoUp to 10 distinct addresses; may not include to. CC recipients pass the same suppression and velocity checks as to.
attachmentsNoAt most one PDF up to 5 MiB: { "filename": "<name>.pdf", "contentType": "application/pdf", "contentBase64": "<base64>" }. Attachment bytes are removed from storage after a terminal outcome.
fromNo{ "email", "name"? }. The domain must be a verified sending domain of the project; any local part is allowed. Without name, the domain's sender display name is used. Without from, a verified default sending domain must be active.
replyToNoOne address; may use an external domain.

Example ​

sh
curl -X POST "https://sdk-api.funnelsgrove.com/integration/v1/email/deliveries" \
  -H "Authorization: Bearer <project-sdk-secret-key>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: login-code-481953" \
  --data '{
    "template": "login-code",
    "to": "person@example.com",
    "variables": { "code": "481953", "expiresInMinutes": 10 },
    "from": { "email": "security@mail.example.com", "name": "Example Security" },
    "replyTo": "support@example.com"
  }'

Response ​

202 with the delivery receipt:

json
{ "id": "<delivery-id>", "status": "queued" }

Errors ​

StatusMeaning
400The body or Idempotency-Key is invalid, or the variables do not match the template.
404The template does not exist or is not published.
409Project sending is paused, no sender is available, or the recipient is suppressed.
429The recipient's velocity limit was exceeded.
503Admission is temporarily unavailable; retry with backoff.

Get delivery ​

Scope: email_deliveries:read

Request ​

http
GET /email/deliveries/:deliveryId

Example ​

sh
curl "https://sdk-api.funnelsgrove.com/integration/v1/email/deliveries/<delivery-id>" \
  -H "Authorization: Bearer <project-sdk-secret-key>"

Response ​

json
{
  "id": "<delivery-id>",
  "status": "sent",
  "terminalReason": null,
  "createdAt": "…",
  "updatedAt": "…",
  "sentAt": "…",
  "failedAt": null
}

Errors ​

StatusMeaning
400deliveryId is not a UUID.
404The delivery does not exist in this project.

Update variables ​

Replaces the variables of a queued lifecycle delivery during its personalization window. For a step with personalizationEnabled, funnelsgrove sends the email.personalization_requested webhook 20 minutes before the due time; call this endpoint after the webhook and before dueAt.

Scope: email_deliveries:write

Request ​

http
PATCH /email/deliveries/:deliveryId/variables
Content-Type: application/json

Parameters ​

FieldRequiredPurpose
variablesYesA value per declared template variable. Only declared variables with valid types are accepted.

Example ​

sh
curl -X PATCH "https://sdk-api.funnelsgrove.com/integration/v1/email/deliveries/<delivery-id>/variables" \
  -H "Authorization: Bearer <project-sdk-secret-key>" \
  -H "Content-Type: application/json" \
  --data '{ "variables": { "firstName": "Ada" } }'

Response ​

json
{
  "id": "<delivery-id>",
  "status": "queued",
  "variables": { "firstName": "Ada" },
  "subject": "…",
  "html": "…",
  "text": "…",
  "dueAt": "…",
  "updatedAt": "…"
}

Errors ​

StatusMeaning
400The variables do not match the template.
404The delivery does not exist in this project.
409The delivery is outside its personalization window or has started sending.

Build. Launch. Grow.