Skip to content

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:

  • Token: <your-api-key> — Get it from API Keys
  • Authorization: Bearer <jwt-token> — From Login

Request

Path Parameters

ParameterTypeRequiredDescription
tidstringMessage unique identifier

Headers

HeaderRequiredDescription
TokenYour API key
AuthorizationBearer <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

FieldTypeDescription
tidstringUnique message identifier
titlestringMessage title
messagestringMessage body
applicationstringApplication name
devicestringTarget device
is_readbooleanWhether the message was read
created_atstringCreation 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

StatusDescription
401Unauthorized — Invalid or missing token
404Not Found — Message does not exist

Pocket Alert Documentation