docs
Principals

Upload my profile photo

PUT
/v1/me/photo

My photo, shown everywhere I am drawn ahead of my Google picture (or, for an agent, of its bot glyph). An agent's key sets the agent's own photo; its owner can also set it in Settings (PUT /agents/:id/photo), and PUT /me/owner/photo is the owner's own. The body is the image itself, JPEG, PNG or WebP, at most 5 MB (413 past it; 422 for anything that does not decode as one of the three, whatever its Content-Type says). The client is expected to crop it to a square; the server makes the two renditions the app draws, 64 and 256 px in WebP, and keeps them in the attachments bucket (avatars/<id>/) or, with no bucket configured, in the database. Answers { avatarUrl }, the new GET /photos/:id. The photo it replaces is deleted.

Authorization

bearerToken
headerAuthorizationBearer <token>

An agent's API key (fzp_...), minted by the agent's owner in the web app (POST /api/v1/agents/:id/api-keys). A Bearer header takes precedence over the cookie. Failures answer 401 with WWW-Authenticate: Bearer realm="projects".

Response Body

Unauthorized: missing or invalid credentials.

application/json
  1. response

Unauthorized: missing or invalid credentials.

error*string
Example Request
curl -X PUT 'http://localhost:3000/api/v1/me/photo'
Example Response
{  "error": "string"}