GET: the inbox (manage grant: inbox contents are operational detail). POST: send a message (use grant is enough: sending TO an agent is what the inbox is for).
URL
- Service tierhttps://agents.mattering.io/api/internal/v1/agents/{public_id}/inbox/
Path parameters
| Name | Type |
|---|---|
public_id | str |
Query parameters
| Name | Default |
|---|---|
status | none |
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
body | optional or conditional | none |
fire_error | optional or conditional | none |
fire_status | optional or conditional | none |
fired_inline | optional or conditional | none |
message | optional or conditional | none |
run_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.
Pagination
Accepts limit and offset. The response meta carries total, limit and offset.
Responses
200 data and meta envelope
{
"data": [
{
"id": "...",
"body": "...",
"sender_type": "...",
"sender_label": "...",
"status": "...",
"created_at": "2026-01-01T00:00:00Z",
"consumed_at": "2026-01-01T00:00:00Z",
"consumed_by_run": "...",
"error": "..."
}
],
"meta": {
"total": 0,
"limit": 0,
"offset": 0,
"inbox_mode": "..."
}
}
201 data and meta envelope
{
"data": {
"id": "...",
"body": "...",
"sender_type": "...",
"sender_label": "...",
"status": "...",
"created_at": "2026-01-01T00:00:00Z",
"consumed_at": "2026-01-01T00:00:00Z",
"consumed_by_run": "...",
"error": "..."
},
"meta": {
"total": 0,
"limit": 0,
"offset": 0,
"has_more": true
}
}
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 400 | body_required |
| 403 | agent_sender_refused |
| 403 | manage_required |
| 404 | agent_not_found |
Example
curl -X POST "https://agents.mattering.io/api/internal/v1/agents/PUBLIC_ID/inbox/" \
-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 '{
"body": "...",
"fire_error": "...",
"fire_status": "...",
"fired_inline": "...",
"message": "...",
"run_id": "..."
}'
Source: MatterCore/agents_api.py (agents_api.agent_inbox)