Appearance
Emails API
Send and retrieve email messages.
Send an Email
POST /v1/emailsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| from | string | Yes | Sender email address |
| to | string[] | Yes | Recipient email addresses |
| subject | string | Yes | Email subject |
| html | string | No | HTML content |
| text | string | No | Plain text content |
| cc | string[] | No | CC recipients |
| bcc | string[] | No | BCC recipients |
| reply_to | string | No | Reply-to address |
Example Request
bash
curl -X POST https://api.resendplus.com/v1/emails \
-H "Authorization: Bearer rp_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Welcome!",
"html": "<h1>Welcome aboard!</h1>"
}'Response
json
{
"id": "email_abc123",
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Welcome!",
"status": "queued",
"created_at": "2024-01-15T10:30:00Z"
}Get an Email
GET /v1/emails/{id}Retrieve an email by ID to check its delivery status.
Response
json
{
"id": "email_abc123",
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Welcome!",
"status": "delivered",
"created_at": "2024-01-15T10:30:00Z",
"sent_at": "2024-01-15T10:30:01Z",
"delivered_at": "2024-01-15T10:30:05Z"
}Email Status
| Status | Description |
|---|---|
| queued | Email is queued for sending |
| sent | Email was sent to the mail server |
| delivered | Email was delivered to recipient |
| bounced | Email bounced (invalid address) |
| complained | Recipient marked as spam |
| failed | Email failed to send |