PlunkPlunk
API Reference

Send transactional email

Send a transactional email via the public API. Automatically creates/updates contacts.

POST
/v1/send

Authorization

ApiKeyAuth

AuthorizationBearer <token>

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.

In: header

Request Body

application/json

to*string||

Recipient email(s). Can be a string, an object with {name, email}, or an array of either.

subject?string

Email subject (required if no template)

body?string

Email body HTML (required if no template)

template?string

Template ID to use for this email. When provided, uses the template's subject, body, from, and reply-to settings. You can override these by explicitly providing subject, body, from, or reply fields in the request. Template variables are populated from the data field.

from?string|

Custom from address (requires verified domain). Can be a string or an object with {name, email}.

name?string

Sender display name (alternative to using from.name)

subscribed?boolean

Whether recipient is subscribed to marketing emails. Defaults to false for transactional emails.

Defaultfalse
data?

Template variables

headers?

Custom email headers

reply?string

Reply-to address

Formatemail
attachments?

Email attachments (max 10 attachments, 10MB total)

Itemsitems <= 10

Response Body

application/json

application/json

application/json

curl -X POST "https://next-api.useplunk.com/v1/send" \  -H "Content-Type: application/json" \  -d '{    "to": "user@example.com",    "subject": "Password Reset Request",    "body": "<h1>Reset Your Password</h1><p>Click the link to reset: {{resetLink}}</p>",    "data": {      "resetLink": "https://example.com/reset/abc123"    }  }'
{
  "success": true,
  "data": {
    "emails": [
      {
        "id": "string",
        "to": "string",
        "status": "string"
      }
    ]
  }
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}