---
title: "Upload media file"
method: POST
path: "/v1/media/upload-direct"
tags: ["Messages"]
---

# Upload media file

`POST /v1/media/upload-direct`

Upload a media file using API key authentication and get back a publicly accessible URL.
The URL can be used as attachmentUrl when sending inbox messages.

Files are stored in temporary storage and auto-delete after 7 days.
Maximum file size is 25MB.

Unlike /v1/media/upload (which uses upload tokens for end-user flows),
this endpoint uses standard Bearer token authentication for programmatic use.

## Response `200`

File uploaded successfully

- object
  - `url` string — Publicly accessible URL for the uploaded file
  - `filename` string — Generated unique filename
  - `contentType` string — MIME type of the file
  - `size` integer — File size in bytes

## Other responses

- `400` — No file provided or file too large
- `401` — Unauthorized

---

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