Skip to content

Update Message PUT ​

Update an existing message's content or read status.

Endpoint ​

PUT 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
tidstring✅Message unique identifier

Headers ​

HeaderRequiredDescription
Token✅Your API key
Authorization✅Bearer <jwt-token>

Body Parameters ​

ParameterTypeRequiredDescription
titlestring✅Message title
messagestring✅Message body text
application_idstring❌Application TID
device_idstring❌Device TID
is_readboolean❌Mark as read/unread

Example Request ​

bash
curl -X PUT "https://api.pocketalert.app/v1/messages/jb4xw9elz24c5" \
  -H "Token: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Title",
    "message": "Updated message content",
    "is_read": true
  }'
javascript
const tid = 'jb4xw9elz24c5';
const response = await fetch(`https://api.pocketalert.app/v1/messages/${tid}`, {
  method: 'PUT',
  headers: {
    'Token': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'Updated Title',
    message: 'Updated message content',
    is_read: true
  })
});
python
import requests

tid = 'jb4xw9elz24c5'
response = requests.put(
    f'https://api.pocketalert.app/v1/messages/{tid}',
    headers={'Token': 'your-api-key'},
    json={
        'title': 'Updated Title',
        'message': 'Updated message content',
        'is_read': True
    }
)
print(response.json())
php
$tid = 'jb4xw9elz24c5';
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->put('https://api.pocketalert.app/v1/messages/'.$tid, [
    'title' => 'Updated Title',
    'message' => 'Updated message content',
    'is_read' => true,
]);

return $response->json();

Response ​

Success Response ​

200 OK

Message updated successfully

json
{
  "data": "success"
}

Error Responses ​

StatusDescription
401Unauthorized — Invalid or missing token
404Not Found — Message does not exist
422Validation Error — Missing required fields

Pocket Alert Documentation