Retrieve an email
GET/v1/emails/{id}
Parameters
| Name | In | Description |
|---|---|---|
| idrequired | path | |
| Woyra-Version | header | The dated API version to serve. Omit to pin to the oldest supported version. |
Example
curl https://api.woyra.io/v1/emails/email_01J... \
-H "Authorization: Bearer $WOYRA_KEY"Response
200 The email, including its route decision once dispatched.
| Field | Type | Description |
|---|---|---|
| objectrequired | "email" | |
| idrequired | string | |
| statusrequired | string | One of accepted, scheduled, queued, sent, delivered, undelivered, failed, suppressed, canceled. |
| torequired | string | The one address this copy went to. |
| fromrequired | string | |
| subjectrequired | string | |
| created_atrequired | timestamp | |
| scheduled_at | timestamp | When a scheduled email leaves. Absent once it has. |
| recipients | array of object | On the answer to a send with more than one recipient: one copy per person, each its own email with its own id, status and webhooks. The first is this email. |
| recipients.to | string | |
| recipients.id | string | |
| recipients.status | string | |
| events | array of EmailEvent | On GET /v1/emails/{id}: every status the email has had, oldest
first, so a support ticket can be answered from one request. |
| metadata | object | |
| thread_id | string | The conversation this email belongs to, readable at /v1/emails/threads/{thread_id}. |
| in_reply_to | string | The email this one answers, when it was sent as a reply. |
| route | RouteDecision | Which carrier carried this message, why it was chosen, and what it cost. No other provider shows this. |
| error | ErrorSummary | The canonical failure reason, normalised across every carrier. |
Errors
| Status | Codes |
|---|---|
| 401 | authentication_required, invalid_api_key |
| 403 | insufficient_scope, domain_not_verified, recipient_suppressed, sending_paused, mfa_required |
| 404 | not_found, product_not_offered |
Also in Emails
- GET /v1/emails — List emails
- POST /v1/emails — Send an email
- POST /v1/emails/{id}/cancel — Cancel a scheduled email
- POST /v1/emails/batch — Send a batch of emails
- GET /v1/templates — List templates
- POST /v1/templates — Save an email template
- GET /v1/templates/{id} — Retrieve a template
- PATCH /v1/templates/{id} — Change a template
- DELETE /v1/templates/{id} — Delete a template
- GET /t/o/{token} — Open tracking image
- GET /t/c/{token} — Click tracking redirect
- GET /v1/emails/inbound — Mail received on your domains
- GET /v1/emails/inbound/{id} — Retrieve a received email
- GET /v1/emails/inbound/{id}/attachments/{attachment_id} — Download an attachment
- GET /v1/emails/threads/{id} — A conversation