Get Message GET
Retrieve details of a specific message by its unique identifier.
Endpoint
GET https://api.pocketalert.app/v1/messages/{tid}Authentication
Required
Include one of these headers in your request:
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tid | string | ✅ | Message unique identifier |
Headers
| Header | Required | Description |
|---|---|---|
Token | ✅ | Your API key |
Authorization | ✅ | Bearer <jwt-token> |
Example Request
bash
curl -X GET "https://api.pocketalert.app/v1/messages/jb4xw9elz24c5" \
-H "Token: your-api-key"javascript
const tid = 'jb4xw9elz24c5';
const response = await fetch(`https://api.pocketalert.app/v1/messages/${tid}`, {
headers: { 'Token': 'your-api-key' }
});
const message = await response.json();python
import requests
tid = 'jb4xw9elz24c5'
response = requests.get(
f'https://api.pocketalert.app/v1/messages/{tid}',
headers={'Token': 'your-api-key'}
)
print(response.json())php
$tid = 'jb4xw9elz24c5';
$response = Http::withHeaders([
'Token' => 'your-api-key',
])->get('https://api.pocketalert.app/v1/messages/'.$tid);
return $response->json();Response
Success Response
200 OK
Returns the message object
| Field | Type | Description |
|---|---|---|
tid | string | Unique message identifier |
title | string | Message title |
message | string | Message body |
application | string | Application name |
device | string | Target device |
is_read | boolean | Whether the message was read |
created_at | string | Creation timestamp |
json
{
"tid": "jb4xw9elz24c5",
"title": "Server Alert",
"message": "CPU usage exceeded 90%",
"application": "Monitoring",
"device": "iPhone",
"is_read": true,
"created_at": "18.09.2023 17:35:35"
}Error Responses
| Status | Description |
|---|---|
401 | Unauthorized — Invalid or missing token |
404 | Not Found — Message does not exist |
