Docs / API and agents

Messages and notifications API

Application messages between supplier, applicant and reference, the inbox, and the notification bell.

Messages#

Method and pathWhoWhat
POST /applications/:id/messagesapplicant who owns it, or supplier with messages.view and messages.sendpost a message. Body: body (max 4000), visibility (INTERNAL, APPLICANT, REFERENCE), optional documentIds (max 10)
POST /applications/:id/messages/readapplicant, reference, or supplier with messages.viewmark the thread read
GET /messages/inboxsupplier with messages.viewinbox with unread count; thread selects one thread
POST /reference/:token/messages, GET /reference/:token/messagespublic, link tokena reference writes to and reads the supplier thread

Applicants may only post APPLICANT messages. Attachments must be the poster's own active, unattached uploads on the same application; otherwise 409. Send an Idempotency-Key to make retries safe (a reused key is a 409).

StatusWhen
400invalid body, empty message with no attachment, bad request key
403wrong role or missing permission
404unknown application or thread
410reference link expired
413reference body above 16 KB
42930 posts per user per minute; 20 messages per link and 50 per IP per hour for references; reads 60 per minute
503inbox temporarily unavailable

Posting a message (supplier, applicant or reference) saves it, its activity entry and its email notices (outbox rows plus the sending job) in one transaction. The notice emails are sent a few seconds after the response by a queue job, never inside the request.

Notifications#

All need a session and answer no-store.

Method and pathWhat
GET /notificationsthe bell: { notifications, lastReadAt, unreadCount }, scoped to the caller's organization
GET /notifications/page?shell=app30 days, up to 100 items; the vendor or customer side comes from the role, never the caller; any other shell value is 400
POST /notifications/mark-readbody { itemId, read? }; an empty body does nothing
POST /notifications/mark-all-readmark everything read