Create a subscriber
curl --request POST \
--url https://app.letterbucket.com/api/v1/subscribers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"name": "John Doe"
}
'import requests
url = "https://app.letterbucket.com/api/v1/subscribers"
payload = {
"email": "user@example.com",
"name": "John Doe"
}
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({email: 'user@example.com', name: 'John Doe'})
};
fetch('https://app.letterbucket.com/api/v1/subscribers', 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://app.letterbucket.com/api/v1/subscribers",
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([
'email' => 'user@example.com',
'name' => 'John Doe'
]),
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://app.letterbucket.com/api/v1/subscribers"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\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://app.letterbucket.com/api/v1/subscribers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.letterbucket.com/api/v1/subscribers")
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 \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "019756c2-7f3a-7c2e-9b1d-2a4e6f8c0d11",
"email": "user@example.com",
"name": "John Doe",
"status": "active",
"created_at": "2026-06-11T17:00:00+00:00"
}
}{
"success": false,
"code": "validation_error",
"message": "The request contains invalid data."
}{
"success": false,
"code": "unauthorized",
"message": "Invalid API key."
}{
"success": false,
"code": "api_access_disabled",
"message": "API access is not enabled."
}{
"success": false,
"code": "email_already_subscribed",
"message": "This email is already subscribed to this newsletter.",
"errors": {
"email": [
"Email already subscribed."
]
}
}{
"success": false,
"code": "rate_limit_exceeded",
"message": "Too many requests. Please try again later.",
"errors": {
"retry_after": 42
}
}Subscribers
Create a subscriber
Add one subscriber to your newsletter.
POST
/
subscribers
Create a subscriber
curl --request POST \
--url https://app.letterbucket.com/api/v1/subscribers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"name": "John Doe"
}
'import requests
url = "https://app.letterbucket.com/api/v1/subscribers"
payload = {
"email": "user@example.com",
"name": "John Doe"
}
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({email: 'user@example.com', name: 'John Doe'})
};
fetch('https://app.letterbucket.com/api/v1/subscribers', 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://app.letterbucket.com/api/v1/subscribers",
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([
'email' => 'user@example.com',
'name' => 'John Doe'
]),
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://app.letterbucket.com/api/v1/subscribers"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\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://app.letterbucket.com/api/v1/subscribers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.letterbucket.com/api/v1/subscribers")
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 \"email\": \"user@example.com\",\n \"name\": \"John Doe\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "019756c2-7f3a-7c2e-9b1d-2a4e6f8c0d11",
"email": "user@example.com",
"name": "John Doe",
"status": "active",
"created_at": "2026-06-11T17:00:00+00:00"
}
}{
"success": false,
"code": "validation_error",
"message": "The request contains invalid data."
}{
"success": false,
"code": "unauthorized",
"message": "Invalid API key."
}{
"success": false,
"code": "api_access_disabled",
"message": "API access is not enabled."
}{
"success": false,
"code": "email_already_subscribed",
"message": "This email is already subscribed to this newsletter.",
"errors": {
"email": [
"Email already subscribed."
]
}
}{
"success": false,
"code": "rate_limit_exceeded",
"message": "Too many requests. Please try again later.",
"errors": {
"retry_after": 42
}
}When
status is pending, the subscriber receives a confirmation email. When active, the
subscriber becomes active directly and no confirmation email is sent.A duplicate email within the same newsletter returns
422 with code email_already_subscribed.Authorizations
Your API key, sent as Authorization: Bearer sk_....
Body
application/json
Subscriber email address.
Maximum string length:
254Example:
"user@example.com"
Full name. Stored as first + last name, split on the first space.
Maximum string length:
255Example:
"John Doe"
Optional. active makes the subscriber active directly; pending sends a confirmation email.
Available options:
active, pending Was this page helpful?
⌘I