---
title: "Upload an attachment"
method: POST
path: "/api/v1/chats/{chat_id}/upload"
tags: ["messages"]
---

# Upload an attachment

`POST /api/v1/chats/{chat_id}/upload`

## Request

- Base URL: `https://api.izap.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.izap.ai/api/v1/chats/{chat_id}/upload`
- Auth: HTTP bearer

Uploads a file to be attached to a message on this conversation, and returns the stored reference to pass when sending that message.

## Path parameters

- `chat_id` string, uuid, required

## Response `200`

Successful Response

- FileUploadResponse: Response for file upload
  - `files` UploadedFile[], required
    - `id` string, uuid, required
    - `filename` string, required
    - `file_type` string, required
    - `file_size` integer, required
    - `url` string, required

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The credential is valid but not authorized for this action.
- `404`: The resource, or the business named in the request, does not exist.
- `422`: Validation Error
- `429`: Too many uploads for this business in the current rate-limit window.
- `default`: Unexpected error.

---

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