Get message
Retrieve a single message by UID.
Retrieve a single message by UID.
Authorizations
AuthorizationstringRequired
Bearer authentication using API tokens in the Authorization header.
Path parameters
mailboxResourceIdstringRequiredExample:
Resource ID of the managed mailbox the bearer token is authorized for.
AC1a2b3c4d5e6f7gfolderstringRequiredExample:
Folder path (URL-encoded).
INBOXuidinteger · min: 1RequiredExample:
Message UID.
42Responses
200
Message payload.
application/json
Single message payload.
401
Missing or invalid credentials.
application/json
403
Token is not authorized to manage the requested mailbox.
application/json
404
Resource not found.
application/json
422
Request payload failed validation. params maps field name to an array of error messages.
application/json
500
Server-side failure.
application/json
502
Upstream service is unavailable or returned an unexpected response.
application/json
get/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid}
GET /api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages/{uid} HTTP/1.1
Host: api.mail.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"uid": 123,
"path": "INBOX",
"date": "2024-01-15T10:30:00.000Z",
"flags": [
"\\Seen",
"\\Flagged"
],
"unseen": false,
"size": 2048,
"subject": "Test Email Subject",
"from": {
"name": "John Doe",
"address": "john@example.com"
},
"to": [
{
"name": "John Doe",
"address": "john@example.com"
}
],
"cc": [
{
"name": "John Doe",
"address": "john@example.com"
}
],
"bcc": [
{
"name": "John Doe",
"address": "john@example.com"
}
],
"messageId": "<1234567890@example.com>",
"inReplyTo": "<0987654321@example.com>",
"attachments": [
{
"id": "YXR0YWNobWVudDpJTkJPWDoxMjM6MS4y",
"contentType": "application/pdf",
"sizeBytes": 1024,
"inline": false,
"filename": "document.pdf",
"contentId": "<attachment@example.com>"
}
]
}
}Last updated
Was this helpful?