---
title: "Upload a new piece of media"
method: POST
path: "/v1/media"
tags: ["media"]
---

# Upload a new piece of media

`POST /v1/media`

## Query parameters

- `syncVersions` string

## Response `201`

Media created

- Media
  - `id` string, required — globally unique id of media
  - `orgId` string — parent org id, if the media belongs to an organization
  - `path` string, required — path to the file in media S3 bucket
  - `type` string, required — mime type of file
  - `bytes` integer — size of file in bytes
  - `width` integer — width of image in pixels
  - `height` integer — height of image in pixels
  - `versions` string[], required — versions/sizes available
  - `createId` string, required — created by user id
  - `createBehalfId` string — created on behalf of user id
  - `createAttribution` Attribution
    - `principalUserId` string
    - `agentUserIds` string[]
    - `eventId` string
    - `aiChatId` string
    - `aiToolUseId` string
    - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
  - `createAt` string, required — created timestamp

## Other responses

- `400` — Invalid type or bad request
- `401` — Not authorized

---

[API](https://skmtc.net/charthop/apis/charthop-api.md) · [All operations](https://skmtc.net/charthop/apis/charthop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/charthop/charthop-api/revisions/2de21f45f447/schema)
