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
tidstringMessage unique identifier

Headers

HeaderRequiredDescription
TokenYour API key
AuthorizationBearer <jwt-token>

Body Parameters

ParameterTypeRequiredDescription
titlestringMessage title
messagestringMessage body text
application_idstringApplication TID
device_idstringDevice TID
is_readbooleanMark 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