---
title: "Update/create an asset"
method: PATCH
path: "/api/rest/v1/asset-families/{asset_family_code}/assets/{code}"
tags: ["Asset"]
---

# Update/create an asset

`PATCH /api/rest/v1/asset-families/{asset_family_code}/assets/{code}`

## Request

- Base URL: `http://demo.akeneo.com`
- URL: `http://demo.akeneo.com/api/rest/v1/asset-families/{asset_family_code}/assets/{code}`
- Auth: none declared

This endpoint allows you to update a given asset of a given asset family. Learn more about the <a href="/documentation/update.html#patch-asset-attribute-values">Update behavior</a>. Note that if the asset does not already exist for the given asset family, it creates it. This endpoint is case sensitive on the asset family code.

## Path parameters

- `asset_family_code` string, required
- `code` string, required

## Request body

- object
  - `code` string, required: Code of the asset
  - `asset_family_code` string: Code of the asset family
  - `values` object: Asset attributes values, see the <a href='/concepts/asset-manager.html#focus-on-the-asset-values'>Focus on the asset values</a> section for more details.
  - `created` string, dateTime: Date of creation
  - `updated` string, dateTime: Date of the last update

## Response `201`

Created

## Other responses

- `204`: No content to return
- `400`: Bad request
- `401`: Authentication required
- `415`: Unsupported Media type
- `422`: Unprocessable entity

---

[API](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api.md) - [All operations](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/revisions/d8bda9b93b59?raw)
