(Internal) Publish a notification for fan-out to channels.
POST
/notifications/dispatch
const url = 'https://api.gospl.example/v1/notifications/dispatch';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"weekly_summary.submitted","recipientUserIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"payload":{},"link":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gospl.example/v1/notifications/dispatch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "weekly_summary.submitted", "recipientUserIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "payload": {}, "link": "example" }'Service-to-service. A feature publishes a typed notification; the service resolves channels (type defaults ∩ user preferences, minus mandatory overrides), renders the template, writes the in-app record, and queues email. Tenant-scoped (NT-06).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
type
required
Seed registry; grows per feature. See spec §2.
string
recipientUserIds
required
Array<string>
payload
required
Typed per notification type; supplies the template fields.
object
key
additional properties
any
link
string
Responses
Section titled “ Responses ”Accepted for delivery.
Media type application/json
object
accepted
required
Recipients queued.
integer
Example generated
{ "accepted": 1}Invalid request.
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}Missing/invalid credentials.
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}Not permitted (e.g. dispatch from an untrusted caller, cross-tenant recipient).
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}