Skip to content

Mark legacy messages seen

PATCH {{baseUrl}}/messages/{{userId}}

Marks unseen legacy messages addressed to this user as seen. Source: models/messages.ts seenByRunner().

Response: 200 with the array of MessageSQL rows that were just marked (same shape as “Get legacy messages”), each now carrying a seen_at timestamp. Empty array if there was nothing unseen.

Terminal window
curl --request PATCH 'https://api.firstdelivery.com/api/messages/REPLACE_WITH_USER_ID'
[
{
"id": "9a8b7c6d-4444-4a2b-9c3d-4e5f6a7b8c9d",
"from": "1f2e3d4c-dispatch-uid",
"to": "8e17d5db-da6e-453c-966f-bfc72c125094",
"message": "Heads up, customer called",
"created_at": "2026-06-22T13:55:00.000Z",
"seen_at": "2026-06-22T14:00:05.000Z",
"territory_id": "b2b1c1a0-1111-4a2b-9c3d-4e5f6a7b8c9d"
}
]