API Documentation

Overview

Heybox is a secure and reliable email delivery service that supports HMAC-SHA256 signature authentication to ensure the security and integrity of requests.

Base URL: https://api.heybox.io

Authentication

Every API call requires an access token. Please include the following in your request header. If you don’t have a token yet, please log in to your account and create one in the API Keys page of the dashboard.

Authorization: Bearer <token>

API Endpoints

POST

/v1/send

Send an email

Request Parameters

Parameter Type Required Description
from string Yes Sender email address
to string Yes Recipient email address
subject string Yes Email subject
body string Yes Email content

Code Examples

cURL Example

curl -X POST https://api.heybox.io/v1/send \
  -H "Content-Type: application/json; charset=utf-8" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "test send",
    "body": "test content"
  }'

JavaScript Example

const response = await fetch('https://api.heybox.io/v1/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>'
  },
  body: JSON.stringify({
    from: '[email protected]',
    to: '[email protected]',
    subject: 'test send',
    body: 'test content'
  })
});

const data = await response.json();
console.log(data);

Response Format

{
    "requestId":"7d7db227-4f67-4318-8231-480bf519db54",
    "code":0,
    "success":true,
    "message":"Successfully",
    "ts":1758864125072,
    "data":null
}

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests.

Status Code Description
0 Request successful
100033 Bad request parameters
100023 Email too large
100025 Exceeding the maximum sending limit
100029 Invalid signature
100030 The sending domain is invalid
100031 You have reached the maximum daily sending limit
100047 Your subscription has expired. Please renew to continue using the service
100048 The sender’s email address does not exist
100049 Please activate your account