Get legacy messages
GET {{baseUrl}}/messages/{{userId}}
Gets the legacy 1:1 dispatcher chat thread for this user. Source: models/messages.ts getMessages() — returns a flat array, newest first, capped at 100.
Response fields (array of MessageSQL): from/to (user ids), message (text body), created_at, seen_at (null until read), territory_id.
Examples
Section titled “Examples”curl --request GET 'https://api.firstdelivery.com/api/messages/REPLACE_WITH_USER_ID'const response = await fetch("https://api.firstdelivery.com/api/messages/REPLACE_WITH_USER_ID", { "method": "GET", "headers": {}})const data = await response.json()import requests
response = requests.request( "GET", "https://api.firstdelivery.com/api/messages/REPLACE_WITH_USER_ID", headers={},)response.raise_for_status()Saved responses
Section titled “Saved responses”[ { "id": "9a8b7c6d-4444-4a2b-9c3d-4e5f6a7b8c9d", "from": "8e17d5db-da6e-453c-966f-bfc72c125094", "to": "1f2e3d4c-dispatch-uid", "message": "On my way!", "created_at": "2026-06-22T14:00:00.000Z", "seen_at": null, "territory_id": "b2b1c1a0-1111-4a2b-9c3d-4e5f6a7b8c9d" }]
