API Documentation
SendGrid-compatible REST API for transactional email delivery.
Base URL:
https://chorizo.online
POST
/v3/mail/send
202
Send an email using SendGrid-compatible payload format.
curl -X POST https://chorizo.online/v3/mail/send \
-H "Authorization: Bearer SG.your-api-key" \
-H "Content-Type: application/json" \
-d '{
"personalizations": [
{
"to": [{"email": "user@example.com", "name": "User"}],
"subject": "Hello World"
}
],
"from": {"email": "noreply@yourdomain.com", "name": "My App"},
"content": [
{"type": "text/plain", "value": "Hello!"},
{"type": "text/html", "value": "<h1>Hello!</h1>"}
]
}'
POST
/v3/bounce
200
Process bounce notifications and add recipients to the suppression list.
curl -X POST https://chorizo.online/v3/bounce \
-H "Content-Type: application/json" \
-d '{
"recipients": ["bounced@example.com"],
"reason": "Mailbox not found"
}'
GET
/v3/stats
200
Retrieve sending statistics for a time period.
| Parameter | Type | Description |
|---|---|---|
| days | int | Number of days to look back (1-365, default 30) |
| domain_id | int | Filter by domain (optional) |
curl "https://chorizo.online/v3/stats?days=7" \
-H "Authorization: Bearer SG.your-api-key"
POST
/v3/templates
201
Create a new email template.
curl -X POST https://chorizo.online/v3/templates \
-H "Authorization: Bearer SG.your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "welcome",
"subject": "Welcome, !",
"html_content": "<h1>Hello </h1><p>Welcome aboard.</p>"
}'
GET
/v3/templates
200
List all templates for the authenticated API key.
curl "https://chorizo.online/v3/templates" \
-H "Authorization: Bearer SG.your-api-key"
GET
/v3/templates/{template_id}
200
Get a template by ID.
curl "https://chorizo.online/v3/templates/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer SG.your-api-key"
PATCH
/v3/templates/{template_id}
200
Update a template by ID. Only send the fields you want to change.
curl -X PATCH https://chorizo.online/v3/templates/550e8400-... \
-H "Authorization: Bearer SG.your-api-key" \
-H "Content-Type: application/json" \
-d '{"subject": "Updated subject"}'
DELETE
/v3/templates/{template_id}
204
Delete a template by ID.
curl -X DELETE https://chorizo.online/v3/templates/550e8400-... \
-H "Authorization: Bearer SG.your-api-key"
Response Codes
200
Success
201
Created
202
Accepted for delivery
204
Deleted (no content)
400
Invalid request payload
401
Invalid or missing API key
403
Recipient blocked by ACL rules
404
Resource not found
409
Conflict (duplicate name)
429
Rate limit exceeded