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 In: header
Path Parameters
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" }}Which workspace a bio page is in, for a link that names no workspace
For an old link (`/links/bio/<id>`, an email from before workspace URLs), so the app can send the tab to `/links/w/<slug>/bio/<id>`. It works across the caller's workspaces: the token may be for any of them. It answers only when Links would let the caller read the bio page in its own workspace: they are a member with a product seat, Links is on there, and they own the page (bio pages are owner-only). Every other case gets the same 404, byte for byte: no such bio page, one the caller can't read, Links turned off there, a record from before workspaces, a malformed id, or a request made with an API key or an OAuth grant (those are bound to one workspace by consent). Both answers are `Cache-Control: no-store`. Rate-limited per user and per client IP (the edge's CF-Connecting-IP), one limit across the three locate routes.
Remove the page's avatar or background image
Deletes the stored object (if any) and clears the corresponding theme field. Idempotent — deleting an already-empty kind still returns 204.