---
title: "Create an asset"
method: POST
path: "/asset"
tags: ["Asset"]
---

# Create an asset

`POST /asset`

Creates a new asset.

## Request body

- AssetCreate
  - `type` 'docker-image' | 'lambda' | 'bundle', required — The type of the asset.
  - `url` string, uri, required — The url of the asset. > • For docker-image assets, this should be the local tagged image or image name. > > • For lambda assets, this should be the file path of the lambda package.
  - `name` string, required — The name of the asset.
  - `build_id` integer, required — The ID of the build that the asset belongs to.
  - `application_id` integer, required — The ID of the application that the asset belongs to.
  - `commit-sha` string — The commit SHA that the asset was built from.
  - `metadata` MetadataComponent — The metadata loaded via the metadata catalog API.
    - `key` string — The key of the metadata.
    - `value` string — The value of the metadata.
    - `additional_properties` object — Additional metadata properties, including schemas and tags.
      - `schemas` object[] — The JSON schemas of the metadata.
      - `tags` object[] — Tags associated with the metadata.
        - `key` string
        - `value` string
  - `platform` 'x86_64' | 'arm_64' — The platform of the asset.

## Response `201`

The operation was successful.

- AssetResponse
  - `id` integer, required — The ID of the asset.
  - `name` string — The name of the asset.
  - `build_id` integer, required — The ID of the build that the asset belongs to.
  - `type` 'docker-image' | 'lambda' | 'bundle', required — The type of the asset.
  - `platform` 'x86_64' | 'arm_64' — The platform of the asset.
  - `url` string, uri, required — The url of the asset. > •For docker-image assets, this should be the local tagged image or image name. > > •For lambda assets, this should be the file path of the lambda package.
  - `nrn` string — The resource name (NRN) uniquely identifying the asset.
  - `branch` string — The branch that the asset was built from.
  - `commit` object
    - `id` integer — The ID of the commit that the asset was built from.
    - `permalink` string — The permalink to the commit that the asset was built from.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) · [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nullplatform/nullplatform-api/revisions/1c4ea154b159/schema)
