---
title: "Register an already-uploaded media file"
method: POST
path: "/api/media"
---

# Register an already-uploaded media file

`POST /api/media`

## Request

- Base URL: `https://api.seenpaid.com`
- URL: `https://api.seenpaid.com/api/media`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.seenpaid.com/authorize`, token URL `https://api.seenpaid.com/token`, scopes: `posts:write`)

Register a media file (after uploading via the presigned URL) so it can be attached to a post.

## Request body

- object
  - `url` string, uri, required
  - `type` 'image' | 'video', required

## Response `201`

Created

- object
  - `success` true
  - `data` Media
    - `id` string, uuid
    - `url` string, uri
    - `type` 'image' | 'video'
    - `createdAt` string, date-time

## Other responses

- `400`: Request body failed Zod validation.
- `401`: Missing or invalid credential (API key or OAuth token).

---

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