---
title: "Upload task evidence"
method: POST
path: "/v1/tasks/{taskId}/attachments"
tags: ["Tasks"]
---

# Upload task evidence

`POST /v1/tasks/{taskId}/attachments`

Upload an evidence attachment to a task so auditors and reviewers can trace completion back to source documentation.

## Path parameters

- `taskId` string, required

## Request body

- UploadAttachmentDto
  - `fileName` string, required — Name of the file
  - `fileType` string, required — MIME type of the file
  - `fileData` string, required — Base64 encoded file data
  - `description` string — Description of the attachment
  - `userId` string — User ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)

## Response `201`

Attachment uploaded successfully

- AttachmentResponseDto
  - `id` string, required — Unique identifier for the attachment
  - `name` string, required — Original filename
  - `type` string, required — File type/MIME type
  - `size` number, required — File size in bytes
  - `downloadUrl` string, required — Signed URL for downloading the file (temporary)
  - `createdAt` string, date-time, required — Upload timestamp

## Other responses

- `400` — Invalid file data or file too large
- `401` — Unauthorized - Invalid authentication
- `404` — Task not found

---

[API](https://skmtc.net/om-network/apis/betayum-api.md) · [All operations](https://skmtc.net/om-network/apis/betayum-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/om-network/betayum-api/revisions/1c5403653ecf/schema)
