Snag Docs logo

Get Asset upload URL

This endpoint enables you to upload a file to the resource. Returns a presigned URL and the asset's public URL.

POSThttps://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.

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

organizationIdstring<uuid>

UUID of the organization (optional, converted to lowercase)

websiteIdstring<uuid>

UUID of the website (optional, converted to lowercase)

userIdstring<uuid>

UUID of the user (optional, converted to lowercase)

filePath"images" | "videos" | "banners" | "fonts" | "posts" | "profiles" | "minting" | "loyalty" | "tokenClaims" | "dapps"

The file path, must be a valid enum value.

Allowed values: "images" | "videos" | "banners" | "fonts" | "posts" | "profiles" | "minting" | "loyalty" | "tokenClaims" | "dapps"
fileNamestringrequired

The name of the file, must match the regex pattern (converted to lowercase) and have a valid extension.

Pattern: ^[^\/\\]+$
fileSizenumberrequired

Size of the file in bytes. Uploaded file must match this file size. 1mb for images and 10mb for videos.

Response

application/json

200

signedUrlstring<uri>required

The pre-signed URL to be used for uploading the file.

urlstring<uri>required

The URL of the uploaded file.