---
title: "Create a new media file for a reference entity or a record"
method: POST
path: "/api/rest/v1/reference-entities-media-files"
tags: ["Reference entity media file"]
---

# Create a new media file for a reference entity or a record

`POST /api/rest/v1/reference-entities-media-files`

This endpoint allows you to create a new media file and associate it to the image of a reference entity, or to the main image or to an attribute value of a record.

## Headers

- `Content-type` string, required

## Request body

- object
  - `file` string, binary, required — The binary of the media file

## Response `201`

Created

## Other responses

- `401` — Authentication required
- `415` — Unsupported Media type
- `422` — Unprocessable entity

---

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