---
title: "Set the caller's profile photo"
method: POST
path: "/api/membership/profile/photo"
tags: ["membership"]
---

# Set the caller's profile photo

`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

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.

## Request body

- MemberPhotoRequest: Supply the image exactly one way.
  - `data_url` string: A data: URL, e.g. data:image/png;base64,...
  - `base64` string: Bare base64 with no data: prefix.

## Response `200`

The saved profile, photo included.

- MemberPhotoResponse
  - `ok` boolean, required
  - `profile` MemberProfile, required
    - `clerk_user_id` string, required
    - `first_name` string
    - `photo_data_url` string: Set through /api/membership/profile/photo, not this route.
    - `company_website` string: Normalized to an absolute URL on save.
    - `company_logo_url` string: Derived from company_website; not settable directly.
    - `public_visible` boolean, required: Whether the member appears on the public members wall.
    - `ring` string, required: Snapshot of the member's tier at the last save — public | ft-member | ai-floor | ic-member | operator.
    - `updated_at` string, date-time, required
  - `base64_len` integer: Length of the stored WebP data URL. The photo lives inside the record, so this is what it costs.

## Other responses

- `400`: Invalid JSON, no image supplied, or an image the cropper rejected.
- `401`: No auth.
- `403`: Scope/tier not authorized.

---

[API](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api.md) · [All operations](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/revisions/be67c1f67c27?raw)
