---
title: "Upload media to channel"
method: POST
path: "/api/messaging/channels/{channelId}/upload-media"
tags: ["media"]
---

# Upload media to channel

`POST /api/messaging/channels/{channelId}/upload-media`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/channels/{channelId}/upload-media`
- Auth: none declared

Upload media file to a specific channel

## Path parameters

- `channelId` string, uuid, required

## Request body `multipart/form-data`

- object
  - `file` string, binary: Media file to upload
  - `agentId` string, uuid: ID of the agent uploading the media

## Response `200`

Media uploaded successfully

- object
  - `id` string, uuid
  - `url` string: URL of the uploaded media
  - `channelId` string, uuid
  - `agentId` string, uuid
  - `type` 'image' | 'video'
  - `mimeType` string
  - `size` integer

## Other responses

- `400`: Invalid request
- `413`: File too large
- `415`: Unsupported media type
- `500`: Error uploading media

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
