---
id: ci-application-asset-build-create
title: Create an asset for a build
description: Create a new asset for a specific build.
sidebar_label: Create an asset for a build
hide_title: true
hide_table_of_contents: true
api: >-
  eJzNVt9vGzcM/lcEvrQFFDvtsA24tyzdgAwDNqQu9hAYAS3RPjU66Srp4hoH/e8FpXPiOGmXYh2wJ/v0g+T38aPIETRFFUyfjHfQwHkgTCRQONoKjJGSWPsgUMSelFkbJVaDsXoGEhJuIjRXcH4xP38LSwm+p4Bs50JDA8pcY99bo8rSdbF1XS43qjgBCT0G7ChRYEMjOOwIGjAaJBiOpsfUgoRAHwcTSEOTwkASomqpQ2hGSLu+3HCJNhQgyyM4i5bExVvh1yK1VEMveLatUa1IXqgJr6tgZ5CX1R/F9IvXO3Zy7F55l8gl3jpAOP8Q2eX4ODq/+kAqMdzAFCVDkXcr2rtTMQXjNvAUAj65x1Bz8tKXfbRSaFrjYJMwUbzo0LgXrzg59Am73rJdXmNiqpvnuOMT7G5iRAK5oeNMa69uKJyYDjecPYvdSiNIWA1OW2IJ3Lt9cDZL6CihxvQkLw9DONPaVHBif6nk7A79TCxaE0UkxccEWuu3Uez8wAk1TtlBk7hFO+DKkjBu7UNXUiTioFqBUaxZdlsfboSmhMZGKYZI68EKa9xNlAKdFuh2wqeWgghk6RZdEhzLDHI+AHqn2m53cqCGkyOuJshHqweksNFkUuHujFFeVhFCzrwVKPbexaqcN6en/HNEWxFG1bNmpIpiXA/W7jiF30mzRj9RdU9paHDm43BYe/di2jP3408/Z9aOsfr62XaPixlj9MoUyFuT2i+4ev3mhyz/TcH9L0sqYdhQigcRYAi448czURf/OZt98LdGU3gehv3pI2KyhCHY55l4f/mH2LYU6OApM1FYrziDs0nr3/OpgEd1VZxkCZHUEEzalc6zIgwUzobUQnO15B7QUWo997Hex8Ict6IG5kV289HoPC8egC2F230LK1RAm1Ifm/lcmZkbrO0tJn6EZsp3pcHsfb/jsqu5OIzgDjbbganf8Xc9xPIof34rDxs08PvfiwKUy/nyvnn9+l88UvyelhAnUmv7l8AU1Ky8np3OTlkXTF2H7sD/+cN2O80WhdPj5I73b9Y3TSUVQ6JPad7bqVAngdYcXsHeX1MmjZrGpYSWM91cwTiuMNL7YHPm5Y8DBVbJUsItBsNNpaRam8j/NTRrtJG+Ev7Ly2mCeCW+fSD5AqR9xTuud252/AUSbmhXR6i8zBJawlLfV+O0cV6DOlnw9fuLj3pClvsbZ0pRn7569rBc/vrz3YIFOs1Ondd8J+CW5zjc1iDr9FJ0X9ZGsOg2A+utgWqTpYYPq+FI/QXVkzSMYz2x8Dfkcr5jJfE3E5PzZzDKwwk=
sidebar_class_name: post api-method
info_path: docs/api/ci-cd
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/ci-application-asset-build-create'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create an asset for a build"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/build/{id}/asset"}
  context={"endpoint"}
>

</MethodEndpoint>

Create a new asset for a specific build.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the build for which to create an asset."}]}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset (optional, default is 'main').","example":"main"},"type":{"type":"string","description":"The type of asset.","enum":["docker-image","lambda","bundle"],"example":"docker-image"},"metadata":{"type":"object","description":"Additional metadata for the asset. This section allows you to include valuable information such as framework details, useful links, and any other relevant data."}},"example":{"name":"my-application-docker-image","type":"docker-image","metadata":{}},"title":"AssetRequest"}}}}}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Asset created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"The unique ID of the asset.","example":567},"build_id":{"type":"integer","description":"The ID of the build associated with the asset.","example":123},"name":{"type":"string","description":"The name of the asset.","example":"main"},"type":{"type":"string","description":"The type of asset.","enum":["docker-image","lambda","bundle"],"example":"docker-image"},"targets":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"The provider of the asset."},"url":{"type":"string","description":"The URL where the asset is located."}}}},"metadata":{"type":"object","description":"Additional metadata for the asset."}},"title":"Asset"}}}}}}
>

</StatusCodes>

