Update member picture
PUT /api/members/{memberId}/member-picture
- Products: Operator (
FOH), Consumer (CONSUMER) (any one of these products, not all) - Features: Online Bookings (
ONLINEBOOK), Online Joining (ONLINEJOIN), Front of House Generic Access (FOHGENERIC) (any one of these features, not all)
Overview
Stores a member's profile photograph. There is one picture per member, so this call adds it the first time and replaces it thereafter.
Three things gate the call, and all three are tenant configuration:
- Picture upload must be switched on for the tenant. If it is not — including when the setting is simply absent — every call returns
403, whatever you send. - A minimum age may apply. Members below it are refused with
400. The default when the setting is absent is no minimum. - A cooldown applies between successful uploads, 180 days unless the tenant has configured otherwise. A second upload inside that window returns
409with a JSON body explaining when the member may try again. The clock starts at the last successful upload, so a rejected attempt does not extend it. Get member picture returns the configured number of days asuploadFrequency.
A successful upload also resets the member's photo-check attempt count to 0. Get member picture reports that count and the time of the last successful upload too, so you can tell a member whether and when they can upload before you call this endpoint.
This endpoint stores what you send. It does not run the image-content checks (face detection, adult content, AI-generated imagery and so on) that the separate picture-validation endpoint performs — run those first if your product needs them.
Linked members are permitted — a token issued for a member linked to {memberId} may call this endpoint.
Endpoint
PUT {base_url}/api/members/{memberId}/member-picture
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
memberId | integer (int32) | Yes | The member whose picture is stored. Must match the member id in your access token, or be a member linked to it. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
picture | string | Yes | The image as a plain base64 string. Strip any data-URI prefix — data:image/png;base64, makes the value fail the base64 check and returns 400. The decoded image must be 2 MB or smaller, so the base64 text itself is roughly 2.7 MB at most. Whitespace-only and empty values are rejected. |
Sample request
curl -X PUT '{base_url}/api/members/{memberId}/member-picture' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true' \
-H 'Content-Type: application/json' \
-d '{
"picture": "iVBORw0KGgoAAAANSUhEUgAA..."
}'Errors
A successful call returns 204 No Content. Only the 409 carries a structured body; the other failures return a plain-text message.
| Status | Meaning | When |
|---|---|---|
400 | Bad request | picture is missing, empty, whitespace, or is not valid base64 — usually a data-URI prefix left in place: The given picture is not a valid base64 value |
400 | Bad request | The decoded image is larger than 2 MB: Image size must be 2MB or smaller. |
400 | Bad request | The member is younger than the tenant's minimum age for picture upload: Member is below minimum age for uploading their picture |
403 | Forbidden | The tenant has not enabled member picture upload, or the setting is missing: Member Picture Upload is not enabled |
404 | Not found | No member exists with that id: The member with ID {memberId} could not be found to update the picture |
409 | Conflict | The member uploaded a picture too recently. The body is JSON — {"isValid": false, "reason": 17, "message": "Your picture cannot be changed yet. You can upload a new picture 180 days after your last update"} — where reason is the numeric UploadCooldownActive code and the day count reflects the tenant's configured frequency. |
500 | Internal server error | The change could not be saved, or another unexpected server-side failure occurred. No detail is returned in the body. |