POST
/
send
curl -X POST 'https://api.shoutbox.net/send' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello World",
    "html": "<h1>Welcome!</h1>"
  }'
{
  "success": true,
  "message_id": "msg_123abc456def"
}

Authentication

All API requests require authentication using a bearer token in the Authorization header.

Authorization
string
required

Format: Bearer YOUR_API_KEY

Request

Body Parameters

from
string
required

Sender email address

to
string
required

Recipient email address(es). Multiple recipients can be specified using commas. Can include names in format: Name <[email protected]>

subject
string
required

Email subject line

html
string
required

HTML content of the email

name
string

Sender name

reply_to
string

Reply-to email address. Can include name in format: Name <[email protected]>

attachments
array

Array of attachment objects

headers
object

Custom email headers

Response

success
boolean

Indicates if the email was sent successfully

message_id
string

Unique identifier for the sent email

Examples

Basic Email

curl -X POST 'https://api.shoutbox.net/send' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello World",
    "html": "<h1>Welcome!</h1>"
  }'
{
  "success": true,
  "message_id": "msg_123abc456def"
}

Email with Attachments and Headers

curl -X POST 'https://api.shoutbox.net/send' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "[email protected]",
    "name": "Reports Team",
    "to": "John Smith <[email protected]>",
    "reply_to": "Support Team <[email protected]>",
    "subject": "Monthly Report",
    "html": "<h1>Monthly Report</h1><p>Please find your report attached.</p>",
    "attachments": [
      {
        "content": "VGhpcyBpcyBhbiBhdHRhY2htZW50IQo=",
        "filename": "report.pdf"
      }
    ],
    "headers": {
      "X-Priority": "1",
      "X-Campaign-ID": "monthly_report_2024"
    }
  }'
{
  "success": true,
  "message_id": "msg_789xyz012uvw"
}