List tasks, or create one with POST. derived from route
URL
- User APIhttps://sales.mattering.io/api/user/v1/tasks/
- Service tierhttps://sales.mattering.io/api/internal/tasks/
Query parameters
| Name | Default |
|---|---|
due_after | none |
due_before | none |
sort | none |
updated_after | none |
updated_before | none |
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
assigned_to_email | optional or conditional | none |
business_id | optional or conditional | none |
contact_id | optional or conditional | none |
description | optional or conditional | none |
due_date | optional or conditional | none |
priority | optional or conditional | none |
status | optional or conditional | none |
tags | optional or conditional | none |
title | optional or conditional | none |
Keys the view reads. A key not in this list is ignored by the view, silently. 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, returned, has_more and next_offset.
Responses
200 data and meta envelope
{
"data": {
"tasks": [
{
"...": "..."
}
]
},
"meta": {
"total": 0,
"limit": 0,
"offset": 0,
"returned": 0,
"has_more": true,
"next_offset": 0
}
}
201 data and meta envelope
{
"data": {
"task": {
"...": "..."
}
},
"meta": {
"total": 0,
"limit": 0,
"offset": 0,
"returned": 0,
"has_more": true,
"next_offset": 0
}
}
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 400 | anchor_mismatch |
| 400 | invalid_due_date |
| 400 | invalid_json |
| 400 | invalid_priority |
| 400 | invalid_status |
| 400 | missing_field |
| 400 | tags_must_be_list |
| 404 | business_not_found |
| 404 | contact_not_found |
| 404 | owner_not_found |
Example
curl -X POST "https://sales.mattering.io/api/user/v1/tasks/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assigned_to_email": "...",
"business_id": "...",
"contact_id": "...",
"description": "...",
"due_date": "...",
"priority": "...",
"status": "...",
"tags": "..."
}'curl -X POST "https://sales.mattering.io/api/internal/tasks/" \
-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 '{
"assigned_to_email": "...",
"business_id": "...",
"contact_id": "...",
"description": "...",
"due_date": "...",
"priority": "...",
"status": "...",
"tags": "..."
}'
Source: CRMCore/timeline_api.py (timeline_api.tasks)