Menu
POST attachments/{attachment_id}/ User API

Fetch one attachment, returning content shaped by its kind.

Recognized config keys: * include_content (bool, default True): set False to fetch only metadata * max_bytes (int, default 2 MB, hard cap 10 MB): guards binary payloads * force_binary (bool, default False): return base64 even for text/PDF * page_limit (int, default 50): for PDF text extraction

Response shape (JSON):
  {
    "success": true,
    "attachment": <metadata>,
    "content": {
      "kind": "image" | "text" | "pdf" | "binary",
      "mime_type": "...",
      "encoding": "base64" | "utf-8",
      "data": <string>,
      "truncated": bool,
      "page_count": int  (PDFs only),
    }
  }

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/attachments/{attachment_id}/

Path parameters

NameType
attachment_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone

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,
  "attachment": {
    "public_id": "...",
    "filename": "...",
    "mime_type": "...",
    "file_extension": "...",
    "file_size": "...",
    "formatted_size": "...",
    "is_image": true,
    "kind": "...",
    "file_url": "...",
    "uploaded_by": {
      "id": "...",
      "name": "..."
    },
    "created_at": "2026-01-01T00:00:00Z"
  },
  "content": {
    "kind": "pdf",
    "mime_type": "application/pdf",
    "encoding": "utf-8",
    "data": {
      "...": "..."
    },
    "page_count": 0,
    "truncated": true
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401missing_actor
401unauthorized
403forbidden
404attachment_not_found
413binary_too_large
413image_too_large
500read_failed

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/attachments/ATTACHMENT_ID/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_get_attachment)

POST tasks/{task_id}/attachments/ User API

List attachments on a task (metadata only).

Recognized config keys: limit (optional, default 200, max 1000).

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/tasks/{task_id}/attachments/

Path parameters

NameType
task_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone

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 1000. Check the response for a total or count field.

Responses

200 bare JSON object (no envelope)

{
  "success": true,
  "task_id": "...",
  "attachments": [
    {
      "public_id": "...",
      "filename": "...",
      "mime_type": "...",
      "file_extension": "...",
      "file_size": "...",
      "formatted_size": "...",
      "is_image": true,
      "kind": "...",
      "file_url": "...",
      "uploaded_by": {
        "id": "...",
        "name": "..."
      },
      "created_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401missing_actor
401unauthorized
403forbidden
404task_not_found

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/tasks/TASK_ID/attachments/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_list_attachments)

POST tasks/{task_id}/attachments/request-upload/ User API

Create a signed, time-limited upload URL for direct file upload.

Returns a URL that accepts a multipart POST with a file field. The URL embeds a signed token valid for 10 minutes: no JWT or session cookie is needed on the upload request itself.

This enables MCP / AI agents to upload files via a plain HTTP POST (e.g. curl -F file=@path) instead of passing base64 through tool-call arguments, which are corrupted by MCP transport past ~5 KB.

Recognized config keys: * filename (required) * mime_type (optional)

This read is not paginated. It returns at most 12 rows and does not report a total, so a result of exactly 12 may be truncated.

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/tasks/{task_id}/attachments/request-upload/

Path parameters

NameType
task_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone

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)

{
  "upload_url": "...",
  "expires_in_seconds": 600,
  "method": "POST",
  "field_name": "file",
  "curl_command": "..."
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400missing_filename
401missing_actor
401unauthorized
403forbidden
404task_not_found

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/tasks/TASK_ID/attachments/request-upload/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_request_upload_url)

POST tasks/{task_id}/attachments/upload/ User API

Upload a file attachment from base64-encoded bytes.

Recognized config keys: * filename (required): original filename including extension * mime_type (optional): inferred from filename when omitted * data_base64 (required): base64-encoded file bytes (max ~10 MB)

This read is not paginated. It returns at most 8 rows and does not report a total, so a result of exactly 8 may be truncated.

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/tasks/{task_id}/attachments/upload/

Path parameters

NameType
task_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone
user_idoptional or conditionalnone

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,
  "task_id": "...",
  "attachment": {
    "public_id": "...",
    "filename": "...",
    "mime_type": "...",
    "file_extension": "...",
    "file_size": "...",
    "formatted_size": "...",
    "is_image": true,
    "kind": "...",
    "file_url": "...",
    "uploaded_by": {
      "id": "...",
      "name": "..."
    },
    "created_at": "2026-01-01T00:00:00Z"
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400invalid_base64
400missing_data_base64
400missing_filename
401missing_actor
401unauthorized
403forbidden
404task_not_found
413file_too_large

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/tasks/TASK_ID/attachments/upload/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "...",
  "user_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_upload_attachment)

POST tasks/{task_id}/comments/ User API

List comments on a task in chronological order (oldest first).

Recognized config keys: limit (optional, default 200), order (optional, "asc" for oldest-first or "desc" for newest-first; default "asc").

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/tasks/{task_id}/comments/

Path parameters

NameType
task_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone

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 1000. Check the response for a total or count field.

Responses

200 bare JSON object (no envelope)

{
  "success": true,
  "task_id": "...",
  "comments": [
    {
      "public_id": "...",
      "content": "...",
      "author": {
        "id": "...",
        "email": "...",
        "name": "..."
      },
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401missing_actor
401unauthorized
403forbidden
404task_not_found

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/tasks/TASK_ID/comments/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_list_comments)

POST tasks/{task_id}/recordings/list/ User API

List screen/video recordings on a task (metadata only).

Recordings are a DISTINCT model from attachments: the in-app screen recorder and the task-card video uploader write TaskRecording rows, which the attachment endpoints never surface. This is the read path that makes those uploads visible to MCP clients and lets automations resolve a worker-fetchable gcs_uri for each one.

Recognized config keys: limit (optional, default 200, max 1000).

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/tasks/{task_id}/recordings/list/

Path parameters

NameType
task_idstr

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone
space_idoptional or conditionalnone

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 1000. Check the response for a total or count field.

Responses

200 bare JSON object (no envelope)

{
  "success": true,
  "task_id": "...",
  "recordings": [
    {
      "public_id": "...",
      "filename": "...",
      "kind": "recording",
      "file_size": "...",
      "formatted_size": "...",
      "duration": "...",
      "formatted_duration": "...",
      "gcs_uri": "...",
      "managed_file_id": "...",
      "file_url": "...",
      "file_source": "task-rec",
      "transcript_status": "...",
      "recorded_by": {
        "id": "...",
        "name": "..."
      },
      "created_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401missing_actor
401unauthorized
403forbidden
404task_not_found

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/tasks/TASK_ID/recordings/list/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "...",
  "space_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_list_recordings)

All Productivity resources
Start Free Explore our Products