---
title: "Upload attachments to a conversation draft"
method: POST
path: "/attachments/conversation/{conversationId}/attachment"
tags: ["Attachments"]
---

# Upload attachments to a conversation draft

`POST /attachments/conversation/{conversationId}/attachment`

## Request

- Base URL: `https://api.thrivedesk.com/v1`
- URL: `https://api.thrivedesk.com/v1/attachments/conversation/{conversationId}/attachment`
- Auth: HTTP bearer

Upload attachments to a conversation draft.

## Path parameters

- `conversationId` string, required

## Request body `multipart/form-data`

- object
  - `attachments[]` string[], required: One or more files.
  - `draft_id` string: Draft message to attach to. Pass the literal string "null" to create a draft on the fly.
  - `is_inline` boolean: Mark the files as inline images.

## Response `200`

Success.

- AttachmentUploadResponse
  - `message` string, required
  - `draft_id` string, required: The draft the files were attached to (created on the fly when `draft_id` is "null").
  - `data` object[], required: The stored attachment records.
    - `attachment_id` string
    - `name` string
    - `size` integer
    - `type` string: MIME type.
    - `inline` boolean

## Other responses

- `401`: Missing or invalid bearer token.
- `403`: Token is valid but does not include a required scope, or the user does not have access to the resource.
- `404`: Resource not found.
- `422`: Request body failed validation.
- `429`: Rate limit exceeded. The `Retry-After` header indicates how long to wait before retrying. See [Pagination and rate limits](/get-started/pagination) for the full rate-limit policy.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/thrivedesk/apis/thrivedesk-public-api.md) - [All operations](https://skmtc.dev/thrivedesk/apis/thrivedesk-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thrivedesk/apis/thrivedesk-public-api/revisions/dce9c632a018?raw)
