---
title: "Create format and associate to asset"
method: POST
path: "/v1/assets/{asset_id}/formats/"
---

# Create format and associate to asset

`POST /v1/assets/{asset_id}/formats/`

## Request

- Base URL: `https://app.iconik.io/API/files`
- URL: `https://app.iconik.io/API/files/v1/assets/{asset_id}/formats/`
- Auth: none declared. Required headers: `App-ID`, `Auth-Token`
- TypeScript: <https://skmtc.dev/iconik/apis/iconik-files/docs/v1/assets/:asset_id/formats/post.ts> (a function with typed inputs; its response is checked against the schema)

Required roles:
 - can_write_formats

## Path parameters

- `asset_id` string, required

## Headers

- `App-ID` string, required
- `Auth-Token` string, required

## Request body

- FormatSchema
  - `archive_status` 'NOT_ARCHIVED' | 'ARCHIVING' | 'FAILED_TO_ARCHIVE' | 'ARCHIVED'
  - `asset_id` string, uuid
  - `components` ComponentSchema[]
    - `id` string, uuid
    - `metadata` object: Sequence cannot have more than 10000. Excess values will be stripped
    - `name` string, required
    - `type` 'VIDEO' | 'AUDIO' | 'IMAGE' | 'TEXT' | 'OTHER' | 'NON_MEDIA' | 'EXIF' | 'IPTC' | 'XMP' | 'GENERAL' | 'MANIFEST', required
  - `date_created` string, date-time
  - `date_deleted` string, date-time
  - `date_modified` string, date-time
  - `deleted_by_user` string, uuid
  - `external_references` ExternalReferences[]
    - `action` string
    - `display_name` string
    - `icon` string
    - `uri` string, required
  - `id` string, uuid
  - `is_online` boolean
  - `metadata` object[]: Sequence cannot have more than 10000. Excess values will be stripped
  - `name` string, required
  - `status` 'ACTIVE' | 'DELETED'
  - `storage_methods` string[]
  - `user_id` string, uuid
  - `version_id` string, uuid
  - `warnings` string[]

## Response `201`

Returns a format that was created for this asset

- FormatSchema
  - `archive_status` 'NOT_ARCHIVED' | 'ARCHIVING' | 'FAILED_TO_ARCHIVE' | 'ARCHIVED'
  - `asset_id` string, uuid
  - `components` ComponentSchema[]
    - `id` string, uuid
    - `metadata` object: Sequence cannot have more than 10000. Excess values will be stripped
    - `name` string, required
    - `type` 'VIDEO' | 'AUDIO' | 'IMAGE' | 'TEXT' | 'OTHER' | 'NON_MEDIA' | 'EXIF' | 'IPTC' | 'XMP' | 'GENERAL' | 'MANIFEST', required
  - `date_created` string, date-time
  - `date_deleted` string, date-time
  - `date_modified` string, date-time
  - `deleted_by_user` string, uuid
  - `external_references` ExternalReferences[]
    - `action` string
    - `display_name` string
    - `icon` string
    - `uri` string, required
  - `id` string, uuid
  - `is_online` boolean
  - `metadata` object[]: Sequence cannot have more than 10000. Excess values will be stripped
  - `name` string, required
  - `status` 'ACTIVE' | 'DELETED'
  - `storage_methods` string[]
  - `user_id` string, uuid
  - `version_id` string, uuid
  - `warnings` string[]

## Other responses

- `400`: Bad request
- `401`: Token is invalid
- `default`: Error response

---

[API](https://skmtc.dev/iconik/apis/iconik-files.md) - [All operations](https://skmtc.dev/iconik/apis/iconik-files/llms.txt) - [OpenAPI document](https://skmtc.dev/iconik/apis/iconik-files/revisions/ed57d13791a2?raw)
