Skip to main content
POST
/
emails
Send an email
curl --request POST \
  --url https://api.sendkit.dev/emails \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "user@example.com",
  "from": "Your Name <hello@yourdomain.com>",
  "subject": "Welcome to SendKit",
  "html": "<h1>Hello!</h1><p>Welcome aboard.</p>",
  "text": "Hello! Welcome aboard.",
  "cc": [
    "cc@example.com"
  ],
  "bcc": [
    "bcc@example.com"
  ],
  "reply_to": [
    "support@yourdomain.com"
  ],
  "headers": {
    "X-Custom-Header": "value"
  },
  "tags": [
    {
      "name": "campaign",
      "value": "welcome"
    }
  ],
  "scheduled_at": "2026-03-05 10:30:00",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "content": "JVBERi0xLjQKJeLj...",
      "content_type": "application/pdf"
    }
  ],
  "template": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "variables": {
      "FIRST_NAME": "John",
      "COMPANY": "Acme Inc"
    }
  }
}
'
import requests

url = "https://api.sendkit.dev/emails"

payload = {
"to": "user@example.com",
"from": "Your Name <hello@yourdomain.com>",
"subject": "Welcome to SendKit",
"html": "<h1>Hello!</h1><p>Welcome aboard.</p>",
"text": "Hello! Welcome aboard.",
"cc": ["cc@example.com"],
"bcc": ["bcc@example.com"],
"reply_to": ["support@yourdomain.com"],
"headers": { "X-Custom-Header": "value" },
"tags": [
{
"name": "campaign",
"value": "welcome"
}
],
"scheduled_at": "2026-03-05 10:30:00",
"attachments": [
{
"filename": "invoice.pdf",
"content": "JVBERi0xLjQKJeLj...",
"content_type": "application/pdf"
}
],
"template": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"variables": {
"FIRST_NAME": "John",
"COMPANY": "Acme Inc"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: 'user@example.com',
from: 'Your Name <hello@yourdomain.com>',
subject: 'Welcome to SendKit',
html: '<h1>Hello!</h1><p>Welcome aboard.</p>',
text: 'Hello! Welcome aboard.',
cc: ['cc@example.com'],
bcc: ['bcc@example.com'],
reply_to: ['support@yourdomain.com'],
headers: {'X-Custom-Header': 'value'},
tags: [{name: 'campaign', value: 'welcome'}],
scheduled_at: '2026-03-05 10:30:00',
attachments: [
{
filename: 'invoice.pdf',
content: 'JVBERi0xLjQKJeLj...',
content_type: 'application/pdf'
}
],
template: {
id: '550e8400-e29b-41d4-a716-446655440000',
variables: {FIRST_NAME: 'John', COMPANY: 'Acme Inc'}
}
})
};

fetch('https://api.sendkit.dev/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendkit.dev/emails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => 'user@example.com',
'from' => 'Your Name <hello@yourdomain.com>',
'subject' => 'Welcome to SendKit',
'html' => '<h1>Hello!</h1><p>Welcome aboard.</p>',
'text' => 'Hello! Welcome aboard.',
'cc' => [
'cc@example.com'
],
'bcc' => [
'bcc@example.com'
],
'reply_to' => [
'support@yourdomain.com'
],
'headers' => [
'X-Custom-Header' => 'value'
],
'tags' => [
[
'name' => 'campaign',
'value' => 'welcome'
]
],
'scheduled_at' => '2026-03-05 10:30:00',
'attachments' => [
[
'filename' => 'invoice.pdf',
'content' => 'JVBERi0xLjQKJeLj...',
'content_type' => 'application/pdf'
]
],
'template' => [
'id' => '550e8400-e29b-41d4-a716-446655440000',
'variables' => [
'FIRST_NAME' => 'John',
'COMPANY' => 'Acme Inc'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.sendkit.dev/emails"

payload := strings.NewReader("{\n \"to\": \"user@example.com\",\n \"from\": \"Your Name <hello@yourdomain.com>\",\n \"subject\": \"Welcome to SendKit\",\n \"html\": \"<h1>Hello!</h1><p>Welcome aboard.</p>\",\n \"text\": \"Hello! Welcome aboard.\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"bcc\": [\n \"bcc@example.com\"\n ],\n \"reply_to\": [\n \"support@yourdomain.com\"\n ],\n \"headers\": {\n \"X-Custom-Header\": \"value\"\n },\n \"tags\": [\n {\n \"name\": \"campaign\",\n \"value\": \"welcome\"\n }\n ],\n \"scheduled_at\": \"2026-03-05 10:30:00\",\n \"attachments\": [\n {\n \"filename\": \"invoice.pdf\",\n \"content\": \"JVBERi0xLjQKJeLj...\",\n \"content_type\": \"application/pdf\"\n }\n ],\n \"template\": {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"variables\": {\n \"FIRST_NAME\": \"John\",\n \"COMPANY\": \"Acme Inc\"\n }\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.sendkit.dev/emails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"user@example.com\",\n \"from\": \"Your Name <hello@yourdomain.com>\",\n \"subject\": \"Welcome to SendKit\",\n \"html\": \"<h1>Hello!</h1><p>Welcome aboard.</p>\",\n \"text\": \"Hello! Welcome aboard.\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"bcc\": [\n \"bcc@example.com\"\n ],\n \"reply_to\": [\n \"support@yourdomain.com\"\n ],\n \"headers\": {\n \"X-Custom-Header\": \"value\"\n },\n \"tags\": [\n {\n \"name\": \"campaign\",\n \"value\": \"welcome\"\n }\n ],\n \"scheduled_at\": \"2026-03-05 10:30:00\",\n \"attachments\": [\n {\n \"filename\": \"invoice.pdf\",\n \"content\": \"JVBERi0xLjQKJeLj...\",\n \"content_type\": \"application/pdf\"\n }\n ],\n \"template\": {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"variables\": {\n \"FIRST_NAME\": \"John\",\n \"COMPANY\": \"Acme Inc\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sendkit.dev/emails")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"user@example.com\",\n \"from\": \"Your Name <hello@yourdomain.com>\",\n \"subject\": \"Welcome to SendKit\",\n \"html\": \"<h1>Hello!</h1><p>Welcome aboard.</p>\",\n \"text\": \"Hello! Welcome aboard.\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"bcc\": [\n \"bcc@example.com\"\n ],\n \"reply_to\": [\n \"support@yourdomain.com\"\n ],\n \"headers\": {\n \"X-Custom-Header\": \"value\"\n },\n \"tags\": [\n {\n \"name\": \"campaign\",\n \"value\": \"welcome\"\n }\n ],\n \"scheduled_at\": \"2026-03-05 10:30:00\",\n \"attachments\": [\n {\n \"filename\": \"invoice.pdf\",\n \"content\": \"JVBERi0xLjQKJeLj...\",\n \"content_type\": \"application/pdf\"\n }\n ],\n \"template\": {\n \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"variables\": {\n \"FIRST_NAME\": \"John\",\n \"COMPANY\": \"Acme Inc\"\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "550e8400-e29b-41d4-a716-446655440000"
}
{
"name": "validation_error",
"message": "Invalid API key."
}
{
"name": "validation_error",
"message": "The from address domain is not verified."
}
{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}

Authorizations

Authorization
string
header
required

API key from your SendKit dashboard. Pass it as a Bearer token in the Authorization header.

Body

application/json
to
required

Recipient email address(es). Accepts a single email string or an array of up to 50 emails. Supports display name format (e.g. "Bob bob@example.com").

Example:

"user@example.com"

from
string

Sender email address. Required unless a template is provided (in which case, the template's sender is used as default). Must belong to a verified domain.

Example:

"Your Name <hello@yourdomain.com>"

subject
string

Email subject line. Required unless a template is provided. Maximum 998 characters.

Maximum string length: 998
Example:

"Welcome to SendKit"

html
string

HTML body of the email. Required if text is not provided and no template is used.

Example:

"<h1>Hello!</h1><p>Welcome aboard.</p>"

text
string

Plain text body of the email. Required if html is not provided and no template is used.

Example:

"Hello! Welcome aboard."

cc
string[]

Carbon copy recipients. Supports display name format (e.g. "Name ").

Example:
["cc@example.com"]
bcc
string[]

Blind carbon copy recipients. Supports display name format (e.g. "Name ").

Example:
["bcc@example.com"]
reply_to
string[]

Reply-to email addresses. Supports display name format (e.g. "Name ").

Example:
["support@yourdomain.com"]
headers
object

Custom email headers as key-value pairs.

Example:
{ "X-Custom-Header": "value" }
tags
object[]

Metadata tags as key-value pairs.

scheduled_at
string<date-time>

Schedule the email for future delivery. Must be a future ISO 8601 timestamp.

Example:

"2026-03-05 10:30:00"

attachments
object[]

File attachments. Maximum 10 per email.

Maximum array length: 10
template
object | null

Use a published template instead of providing html/text directly. When provided, the template's content, subject, and sender are used as defaults. Any explicitly provided fields (from, subject, html, text, reply_to) will override the template values.

Response

Email accepted for delivery

Returned when sending to a single recipient.

id
string<uuid>

Unique identifier of the created email.

Example:

"550e8400-e29b-41d4-a716-446655440000"