POST/v1/blogs/{subdomain}/media

Upload a media file

Uploads a file (`multipart/form-data`) to the blog's media library and returns its public CDN URL. Use that URL as a post `coverImageUrl` or inside the Markdown content. The blog's storage quota applies: a request that would exceed the plan's media storage limit returns 403.

Parameters

Name In Type Description
subdomain*
pathstringSubdomain of the blog
altText
querystringAlternative text describing the media, for accessibility

Request Body

multipart/form-data

filestring (binary)required

The file to upload

Responses

201File uploaded
urlstringrequired

Public CDN URL of the uploaded file — use it as a `coverImageUrl` or inside post content

filenamestringrequired

Original filename of the uploaded file

sizeinteger (int64)required

Size of the uploaded file, in bytes

Code example

POST/v1/blogs/{subdomain}/media
curl -X POST \
  -H "Accept: application/json" \
  "http://localhost:8080/v1/blogs/<subdomain>/media"
POST/v1/blogs/{subdomain}/media
curl -X POST \
  -H "Accept: application/json" \
  "http://localhost:8080/v1/blogs/<subdomain>/media"