Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unosend.co/llms.txt

Use this file to discover all available pages before exploring further.

All API requests require a Bearer token in the Authorization header.
Authorization: Bearer un_your_api_key

Getting an API Key

API
  1. Go to API Keys in your dashboard
  2. Click Create API Key
  3. Copy the key — it starts with un_ and is only shown once

Using the Key

Include it in every request:
curl -X POST https://api.unosend.co/emails \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"from": "hi@yourdomain.com", "to": ["user@example.com"], "subject": "Test", "html": "<p>Hello</p>"}'

Security Best Practices

  • Never expose keys in client-side code — only use them server-side
  • Use environment variables — store keys in UNOSEND_API_KEY, not in source code
  • Rotate keys regularly — delete old keys and create new ones in the dashboard
  • One key per service — use separate keys for different apps so you can revoke independently

Error Responses

StatusMeaning
401Missing or invalid API key
403Key doesn’t have permission for this action