membership

Set the caller's profile photo

Clerk session, or agt_ token with membership:write (live tier re-checked) — the sister route of /api/membership/profile, which cannot set the photo itself. The server crops the supplied image to a 256px square WebP and stores it INSIDE the profile record as a data URL, so the response's profile.photo_data_url is the photo, not a link to it.

post/api/membership/profile/photo

Request

  • Base URL: https://www.immersivecommons.com
  • URL: https://www.immersivecommons.com/api/membership/profile/photo
  • Auth: one of:
    • API key in cookie __session
    • HTTP bearer

Request body

data_urlstring

A data: URL, e.g. data:image/png;base64,...

base64string

Bare base64 with no data: prefix.

Response

The saved profile, photo included.

okboolean required
base64_leninteger

Length of the stored WebP data URL. The photo lives inside the record, so this is what it costs.

Changes

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