Skip to main content

API Documentation

Everything you need to send emails via our REST API

Quick Start

  1. Create an account
  2. Create an API key with your SMTP credentials
  3. Make HTTP POST requests to send emails

How It Works

1

You send HTTP request

POST to our API with your email data

2

We relay via YOUR SMTP

Using the credentials you configured

3

Email is delivered

Sent from your own mail server

Credit Counting

Each recipient counts as one credit, regardless of message size.

Example:

  • 1 TO recipient = 1 credit
  • 1 TO + 2 CC = 3 credits
  • 5 TO + 3 CC + 2 BCC = 10 credits

Base URL

https://remail-fe.perffection.com

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Send Email

POST /api_fe/send_email_fe

Request Body

json
{
  "to_chirho": ["recipient@example.com"],     // Required: array of recipient emails
  "cc_chirho": ["cc@example.com"],            // Optional: array of CC emails
  "bcc_chirho": ["bcc@example.com"],          // Optional: array of BCC emails
  "reply_to_chirho": "replyto@example.com",   // Optional: reply-to address
  "subject_chirho": "Email Subject",          // Required: email subject
  "body_text_chirho": "Plain text body",      // Optional*: plain text version
  "body_html_chirho": "<p>HTML body</p>"      // Optional*: HTML version
}

// * At least one of body_text_chirho or body_html_chirho is required

Success Response (200)

json
{
  "status_chirho": "sent_chirho",
  "emails_remaining_chirho": 9999
}

Error Response (4xx/5xx)

json
{
  "error_chirho": "Invalid API key"
}

Check Usage

GET /api_fe/usage_fe

Returns the current usage statistics for your API key.

json
{
  "emails_remaining_chirho": 9999,
  "emails_sent_chirho": 1
}

Code Examples

cURL

bash
curl -X POST https://remail-fe.perffection.com/api_fe/send_email_fe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to_chirho": ["recipient@example.com"],
    "subject_chirho": "Hello from Remail!",
    "body_text_chirho": "This is a plain text email.",
    "body_html_chirho": "<h1>Hello!</h1><p>This is an HTML email.</p>"
  }'

JavaScript / TypeScript

javascript
const response = await fetch('https://remail-fe.perffection.com/api_fe/send_email_fe', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    to_chirho: ['recipient@example.com'],
    subject_chirho: 'Hello from Remail!',
    body_text_chirho: 'This is a plain text email.',
    body_html_chirho: '<h1>Hello!</h1><p>This is an HTML email.</p>'
  })
});

const data = await response.json();
console.log(data.status_chirho); // "sent_chirho"
console.log(data.emails_remaining_chirho); // 9999

Python

python
import requests

response = requests.post(
    'https://remail-fe.perffection.com/api_fe/send_email_fe',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'to_chirho': ['recipient@example.com'],
        'subject_chirho': 'Hello from Remail!',
        'body_text_chirho': 'This is a plain text email.',
        'body_html_chirho': '<h1>Hello!</h1><p>This is an HTML email.</p>'
    }
)

data = response.json()
print(data['status_chirho'])  # "sent_chirho"
print(data['emails_remaining_chirho'])  # 9999

Rate Limits

Important: Rate limits protect your SMTP server's reputation. Sending too fast can trigger spam filters and blacklisting.

  • 100 emails per minute per API key
  • 1,000 recipients per single request (TO + CC + BCC combined)
  • Rate limit headers are included in responses

Rate Limit Headers

X-RateLimit-Remaining-Chirho: 95 X-RateLimit-Reset-Chirho: 1735200000

Error Codes

StatusMeaning
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - no credits remaining
429Rate limit exceeded
500Server error

Common SMTP Providers

When creating an API key, you'll need your SMTP credentials. Here are settings for popular providers:

Gmail / Google Workspace

Host:smtp.gmail.com Port:587 (TLS) or 465 (SSL) Username:your-email@gmail.com Password:App Password (not your regular password)

Outlook / Microsoft 365

Host:smtp.office365.com Port:587

Amazon SES

Host:email-smtp.[region].amazonaws.com Port:587

SendGrid

Host:smtp.sendgrid.net Port:587 Username:apikey Password:Your SendGrid API key

Developer API

Need programmatic control over API keys and credits? Use Master API Keys for automation and AI integration.

View Developer Docs

Need Help?

Having trouble integrating? Check our pricing page for FAQs or contact us for support.