Skip to content

(Internal) Publish a notification for fan-out to channels.

POST
/notifications/dispatch
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).

Media type application/json
object
type
required

Seed registry; grows per feature. See spec §2.

string
Allowed values: weekly_summary.submitted weekly_summary.response weekly_summary.reminder weekly_summary.monday_digest weekly_goals.non_setter
recipientUserIds
required
Array<string>
>= 1 items
payload
required

Typed per notification type; supplies the template fields.

object
key
additional properties
any
link
string

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"
}