curl --request POST \
  --url https://api.selfmailkit.com/v1/emails \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from": "Your Name <sender@yourdomain.com>",
  "to": "recipient@example.com",
  "subject": "Welcome to Our Service!",
  "html": "<p>Hello {{name}}!</p>",
  "template_id": "welcome-template",
  "text": "Hello {{name}}!",
  "cc": "cc@example.com",
  "bcc": "bcc@example.com",
  "reply_to": "reply@yourdomain.com",
  "variables": {
    "date": "27 November",
    "plan": {
      "value": "Pro Plan",
      "default": "Free Plan"
    },
    "company": {
      "value": null,
      "default": "our company"
    },
    "title": {
      "value": null,
      "default": "valued customer"
    }
  },
  "attachments": [
    {
      "filename": "<string>",
      "path": "<string>",
      "content_type": "<string>"
    }
  ]
}'
{
  "id": "0195c9e3-5067-741d-be87-a4f75ef93372"
}

Authorizations

Authorization
string
header
required

API key with format "Bearer {your-api-key}"

Body

application/json

Response

201
application/json

Email successfully queued for sending

The response is of type object.