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

subdomainpathstringrequired
Subdomain of the blog
altTextquerystringoptional
Alternative text describing the media, for accessibility

Request body

multipart/form-data

filestring (binary)required
The file to upload

Responses

201
File 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" \
  "https://api.writizzy.com/v1/blogs/<subdomain>/media"