---
title: "Create a media resource"
method: POST
path: "/v1/media"
tags: ["Media Files"]
---

# Create a media resource

`POST /v1/media`

## Request body

- MediaPostRequestWrapperDto
  - `data` object, required
    - `file_name` string, required — The name of the media file
    - `type` 'image' | 'video' | 'document', required — The format of the media file
    - `directory` 'temp' | 'perm', required — The directory setting determines how long files are stored. If set to TEMP, files are available for 3 months, while if set to PERM, files are available indefinitely
    - `content_type` string — Content type of the media file

## Response `201`

OK

- MediaPostResponseWrapperDto
  - `data` object
    - `id` string, uuid — The unique identifier assigned to a media file
    - `account_id` string, uuid — The unique identifier of the account
    - `file_name` string — The name of the media file
    - `status` 'pending' | 'uploaded' | 'in_use' — The current state of a media file
    - `directory` 'temp' | 'perm' — The directory setting determines how long files are stored. If set to TEMP, files are available for 3 months, while if set to PERM, files are available indefinitely
    - `type` 'image' | 'video' | 'document' — The format of the media file
    - `content_type` string — Content type of the media file
    - `get_url` string — The URL used to get the media
    - `create_date` string, date-time — Creation date of the media file in UTC, formatted as yyyy-mm-dd hh:mm:ss
    - `update_date` string, date-time — Update date of the media file in UTC, formatted as yyyy-mm-dd hh:mm:ss
    - `put_url` string — The URL to upload the media file
    - `delete_url` string — The URL to delete the media file
    - `links` object
      - `self` string — URL of the requested resource
      - `account` string — URL of the account

## Other responses

- `400` — **Bad Request:** Code Message Description 7702 'data.file\_name' is required 7703 'data.file\_name' is too long File name must be at most 500 characters 7705 'data.directory' is invalid, accepted values (temp, perm) 7706 'data.type' is invalid, accepted values (image, video, document)

---

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