Upload a file (max 5MB) to storage and get back a durable CDN URL. Send the raw file bytes as the request body with Content-Type set to one of the accepted mime types listed below.

Uploads are deduplicated per workspace by SHA-256 of the payload — pushing the same bytes twice returns the existing record (200 OK) rather than creating a duplicate. A fresh upload returns 201 Created.

Trial accounts are limited to 20 uploaded assets. Dedupe hits don't count against the cap.

post/assets

Request

  • Base URL
    https://api.bannerbear.com/v5
  • Auth
    HTTP bearer

Request body

string binary required

Response

Asset already existed (matched by content hash) — existing record returned

uidstring
urlstring uri

CDN URL of the uploaded asset

mime_typestring nullable

Content-Type of the stored asset

sizeinteger

File size in bytes

created_atstring date-time

Changes