Create, update, or delete an organization-level custom field.
URL
- User APIhttps://productivity.mattering.io/api/user/v1/custom-fields/manage/
- Service tierhttps://productivity.mattering.io/api/internal/custom-fields/manage/
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
action | optional or conditional | none |
default_value | optional or conditional | none |
description | optional or conditional | none |
field_id | optional or conditional | none |
field_type | optional or conditional | TEXT_SMALL |
is_required | optional or conditional | false |
name | optional or conditional | New Field |
options | optional or conditional | [] |
space_id | optional or conditional | none |
user_id | optional or conditional | none |
widget_ids | 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,
"field": {
"id": "...",
"public_id": "...",
"name": "...",
"field_type": "..."
}
}
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 |
| 400 | invalid_field_type |
| 401 | missing_actor |
| 401 | unauthorized |
| 403 | forbidden |
| 404 | field_not_found |
| 404 | space_not_found |
Example
curl -X POST "https://productivity.mattering.io/api/user/v1/custom-fields/manage/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "...",
"default_value": "...",
"description": "...",
"field_id": "...",
"field_type": "TEXT_SMALL",
"is_required": false,
"name": "New Field",
"options": []
}'curl -X POST "https://productivity.mattering.io/api/internal/custom-fields/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": "...",
"default_value": "...",
"description": "...",
"field_id": "...",
"field_type": "TEXT_SMALL",
"is_required": false,
"name": "New Field",
"options": []
}'
Source: MatteringPMCore/internal_api.py (internal_api.internal_manage_custom_field)