CMS

Upload or rehost an image

Upload an image and get back a public URL you can use in featured_image, og_image or post body HTML. JSON only — there is no multipart form. Two mutually exclusive shapes: pass url to rehost a public HTTPS image onto Frase storage, or pass data (base64-encoded image bytes) together with content_type. Supplying both is a 400. Requires the write:content scope, and the site must belong to the authenticated organization (404 otherwise). Allowed types are image/jpeg, image/png, image/webp and image/gif; the maximum size is 2 MB. The rehost fetch is SSRF-guarded (HTTPS only, private and metadata address ranges blocked, redirects rejected, 15 second timeout) and size-bounded while streaming; every fetch failure returns the same generic message so the endpoint cannot be used as a DNS-existence oracle. The storage path is derived from the authenticated organization plus the ownership-checked site and a content hash of the bytes — never from a caller-supplied path. Nothing is persisted in a media table: the response URL is the only record, so store it yourself.

post/cms/media

Request

  • Base URL: https://next.frase.io/api/v1
  • URL: https://next.frase.io/api/v1/cms/media
  • Auth: API key in header X-API-KEY

Request body

OR

Response

Image stored.

Changes

No recorded changes to this operation across all 1 revision of this API.