List, create, update, or delete task batches.
URL
- User APIhttps://productivity.mattering.io/api/user/v1/batches/manage/
- Service tierhttps://productivity.mattering.io/api/internal/batches/manage/
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
action | optional or conditional | none |
batch_id | optional or conditional | none |
custom_fields | optional or conditional | {} |
limit | optional or conditional | 100 |
name | optional or conditional | New Batch |
names_only | optional or conditional | none |
offset | optional or conditional | 0 |
task_ids | optional or conditional | none |
user_id | optional or conditional | none |
widget_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 and the server caps limit at 500. Check the response for a total or count field.
Responses
200 bare JSON object (no envelope)
{
"success": true,
"batch": {
"id": "...",
"name": "..."
}
}
200 bare JSON object (no envelope)
{
"batches": [
{
"id": "...",
"name": "...",
"task_count": 0
}
],
"total": 0,
"limit": 100,
"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 | invalid action message |
| 401 | missing_actor |
| 401 | unauthorized |
| 403 | forbidden |
| 404 | batch_not_found |
| 404 | widget_not_found |
Example
curl -X POST "https://productivity.mattering.io/api/user/v1/batches/manage/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "...",
"batch_id": "...",
"custom_fields": {},
"limit": 100,
"name": "New Batch",
"names_only": "...",
"offset": 0,
"task_ids": "..."
}'curl -X POST "https://productivity.mattering.io/api/internal/batches/manage/" \
-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 '{
"action": "...",
"batch_id": "...",
"custom_fields": {},
"limit": 100,
"name": "New Batch",
"names_only": "...",
"offset": 0,
"task_ids": "..."
}'
Source: MatteringPMCore/internal_api.py (internal_api.internal_manage_batch)