---
title: "Upload Message Attachments"
method: POST
path: "/api/cs/tickets/{ticket_id}/messages/{message_id}/attachments"
tags: ["customer_service"]
---

# Upload Message Attachments

`POST /api/cs/tickets/{ticket_id}/messages/{message_id}/attachments`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/cs/tickets/{ticket_id}/messages/{message_id}/attachments`
- Auth: none declared

Attach files to a not-yet-sent reply. Both verticals: gated exactly
like every other write on this ticket (`_require_kind_grant_or_assignee`
-- a b2c CS agent and a b2g account manager both reach this the same
way, through the SAME grant check every other message action here
uses).

Refuses attaching to anything but a draft, outbound message: a sent
message has already left, and attaching to it now would store a file
the customer never received while the thread implies otherwise -- the
same "never claim a file arrived when it did not" floor
AttachmentRejected/AttachmentTooLarge enforce per-file, applied at the
message level instead.

EVERY FILE VALIDATED BEFORE ANY WRITE (mirrors issues/routes.py's
attach_to_intake): a batch that fails on file 2 of 3 stores nothing,
rather than a half-attached reply.

## Path parameters

- `ticket_id` string, uuid, required
- `message_id` string, uuid, required

## Request body `multipart/form-data`

- BodyUploadMessageAttachmentsApiCsTicketsTicketIdMessagesMessageIdAttachmentsPost
  - `files` string[], required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
