---
title: "Create Asset"
method: POST
path: "/v2/assets"
tags: ["Assets V2"]
---

# Create Asset

`POST /v2/assets`

Creates a new asset or updates an existing one with the same key. Requires assets:write scope.

## Request body

- object
  - `project_id` string — ID of the project to create the asset in
  - `application_id` string, required — ID of the application
  - `url` string, required — CDN URL of the asset
  - `key` string, required — Unique key for the asset within the project
  - `name` string, required — Display name of the asset
  - `type` union, required — Media type of the asset
    - 'image' — Image asset
    - 'video' — Video asset
  - `mime_type` string — MIME type of the asset
  - `file_size` number — File size in bytes
  - `width` number — Width in pixels
  - `height` number — Height in pixels

## Response `200`

Success

- object
  - `id` string, required — Unique identifier for the asset
  - `object` 'asset', required — Object type, always `asset`
  - `project_id` string, nullable, required — a string to be decoded into a number
  - `key` string, required — Unique key for this asset within the project
  - `name` string, required — Display name of the asset
  - `url` string, nullable, required — CDN URL of the asset
  - `type` union, required — Media type of the asset
    - 'image' — Image asset
    - 'video' — Video asset
  - `mime_type` string, nullable, required — MIME type of the asset (e.g. image/webp)
  - `file_size` number, nullable, required — File size in bytes
  - `width` number, nullable, required — Width in pixels
  - `height` number, nullable, required — Height in pixels
  - `created_at` string, required — ISO 8601 timestamp of when the asset was created
  - `updated_at` string, required — ISO 8601 timestamp of when the asset was last updated

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `404` — The requested resource was not found
- `429` — Too many requests have been made in a short period
- `500` — An unexpected error occurred on the server

---

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