Send a ``productivity.message`` platform notification to named people.
config: message (required, plain text), optional title, the recipients as recipient_id (one email, username or user id) and/or recipient_ids / recipients / recipient_emails (lists), and an optional task_id or project_id the notification links to. channel is accepted and ignored (in-app is the only channel).
The caller is the actor. Only current members of this workspace who could open the linked task / project (or, with no link, the workspace) receive it; anyone else is dropped silently. No named recipient means nobody. Rate limited to notify.MESSAGE_RATE_LIMIT recipients per organization per hour. results.notifications_sent is how many were notified.
URL
- User APIhttps://productivity.mattering.io/api/user/v1/notifications/send/
- Service tierhttps://productivity.mattering.io/api/internal/notifications/send/
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
config | optional or conditional | none |
space_id | optional or conditional | none |
user_id | optional or conditional | none |
Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.
Responses
200 bare JSON object (no envelope)
{
"success": true,
"results": [
"..."
],
"warning": "rate_limited: some recipients were not notified (per-organization hourly limit)"
}
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 400 | invalid_config |
| 401 | missing_actor |
| 401 | unauthorized |
| 403 | forbidden |
| 404 | project_not_found |
| 404 | task_not_found |
Example
curl -X POST "https://productivity.mattering.io/api/user/v1/notifications/send/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": "...",
"space_id": "...",
"user_id": "..."
}'curl -X POST "https://productivity.mattering.io/api/internal/notifications/send/" \
-H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
-H "X-Internal-Org-Id: $ORG_ID" \
-H "X-Internal-User-Email: you@example.com" \
-H "Content-Type: application/json" \
-d '{
"config": "...",
"space_id": "...",
"user_id": "..."
}'
Source: MatteringPMCore/internal_api.py (internal_api.internal_send_notification)