DevelopersAPI referenceLinksBio
Upload the page's avatar or background image (multipart, "file" field, ≤5MB)
multipart/form-data upload to R2 (image/png, image/jpeg, image/webp, or image/gif). Sets theme.avatarUrl or theme.bgImageUrl depending on kind. If that field was already set, the previously-uploaded image is deleted from storage — replacing an image never leaves an orphaned object behind. 400 when kind is invalid, the file is missing, or the content type isn't one of the allowed image types; 413 when the file is larger than 5MB; 503 when image storage isn't configured for this environment.
View as MarkdownAuthorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
id*string
kind*string
Value in
- "avatar"
- "background"
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/bio/string/media/avatar" \ -F file="string"{ "page": { "id": "string", "handle": "string", "publicUrl": "string", "title": "string", "bio": "string", "theme": { "preset": "string", "layout": "classic", "background": "string", "text": "string", "accent": "string", "bgKind": "solid", "bgImageUrl": "string", "bgFit": "cover", "bgScrim": 0, "bgZoom": 0, "bgPosX": 0, "bgPosY": 0, "shape": "sharp", "fill": "solid", "shadow": "none", "font": "string", "bold": true, "avatarUrl": "string", "customLayout": { "align": "center", "avatar": 0, "band": 0, "arch": true, "rule": true }, "socials": { "property1": "string", "property2": "string" } }, "published": true, "views": 0, "items": [ { "id": "string", "label": "string", "url": "string", "icon": 0, "featured": true } ], "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }}