---
title: 'Get Asset upload URL'
description: 'This endpoint enables you to upload a file to the resource. Returns a presigned URL and the asset''s public URL. Call PUT with the file as the body to upload the asset using the presigned URL.'
openapi: POST /api/assets
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

`POST /api/assets`

`POST https://admin.snagsolutions.io/api/assets`

This endpoint enables you to upload a file to the resource. Returns a presigned URL and the asset's public URL. Call PUT with the file as the body to upload the asset using the presigned URL.

## Authentication

- `apiKeyAuth` — apiKey in header: `X-API-KEY`

## Request body

- Content type: `application/json`
  - request body (object) — Schema for uploading an asset with organization, website, and user details.
    - `organizationId` (string, uuid) — UUID of the organization (optional, converted to lowercase)
    - `websiteId` (string, uuid) — UUID of the website (optional, converted to lowercase)
    - `userId` (string, uuid) — UUID of the user (optional, converted to lowercase)
    - `filePath` (string, one of: images, videos, banners, fonts, posts, profiles, minting, loyalty, tokenClaims, dapps) — The file path, must be a valid enum value.
    - `fileName` (string, required) — The name of the file, must match the regex pattern (converted to lowercase) and have a valid extension.
    - `fileSize` (number, required) — Size of the file in bytes. Uploaded file must match this file size. 1mb for images and 10mb for videos.

## Response 200

200
  - response (object) — Response returned upon successful generation of the signed URL for uploading the file.
    - `signedUrl` (string, uri, required) — The pre-signed URL to be used for uploading the file.
    - `url` (string, uri, required) — The URL of the uploaded file.

## Response 400

400
  - response (object) — Schema for bad request response
    - `message` (string, required) — Error message

## Response 403

403
  - response (object) — Schema for forbidden response
    - `message` (string, required) — Error message

## Response 500

500
  - response (object) — Schema for internal server error response
    - `success` (boolean, required) — Indicates operation success
    - `message` (string, required) — Error message
    - `debugInfo` (string) — Optional debug information


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.snagsolutions.io/api-specs.zip
