---
title: "Upload an attachment to a workflow section record"
method: POST
path: "/monitoring-workflows/{workflowId}/attachments"
tags: ["MonitoringWorkflow"]
---

# Upload an attachment to a workflow section record

`POST /monitoring-workflows/{workflowId}/attachments`

Attaches a file to a specific record within a monitoring workflow section. Use this endpoint to associate evidence or supporting files with a discrete record (e.g. a DEA row, a license row). The `id` form field identifies the target record using the format `{section}-{index}` (e.g. `dea-0`, `licenses-1`) — this value comes from the workflow's section data. The `file` form field is the binary file content and is required. The `expirationDate` form field is optional. Requires `MONITORING_WORKFLOW_DETAILS_UPDATE` and `MONITORING_WORKFLOW_DETAILS_ATTACHMENTS_CREATE`. The `tenant-id` header is mandatory.

## Path parameters

- `workflowId` string, required

## Headers

- `tenant-id` string, required

## Response `201`

Attachment uploaded: `{message, attachment: {fileUrl, fileType, originalFileName, expirationDate, createdAt, createdBy}}`. `fileUrl` is the stored file's location.

- UploadMonitoringWorkflowAttachmentResponse — Response containing the uploaded attachment metadata
  - `message` string — Success message
  - `attachment` MonitoringWorkflowAttachment — Attachment metadata for monitoring workflow row
    - `createdAt` string — Creation timestamp
    - `fileType` string, required — Document file type
    - `fileUrl` string, required — GCS file URL for file retrieval
    - `originalFileName` string, required — Original file name
    - `expirationDate` string — Expiration date
    - `createdBy` string — User who created the record

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
