patch/workshops/{workshopId}experimentalWymagana sesja
Updates the workshop's profile fields: name, tagline, logo, crafter name, background, custom background, title font and accent color. The body is strict, an unknown field is a 400 - `plan` is never accepted here, it is written only by the founder-side plan grant tooling. `background` and `titleFont` are preset ids validated against a fixed list; `customBackground` and `accentColor` are freeform #RRGGBB hex, with null/absent meaning no override. Responds 403 when the caller is not a member of the workshop and 404 when no such workshop exists.
Parametry ścieżki
| Nazwa | Typ | Wymagane | Ograniczenia | Opis |
|---|
| workshopId | string | Tak | - | Workshop id |
Treść żądania
| Pole | Typ | Wymagane | Ograniczenia | Opis |
|---|
| name | string | Nie | minLength: 1 | - |
| tagline | string | Nie | maxLength: 250 | At most 250 characters |
| logo | Emoji | Nie | - | One emoji from Mercastra's curated icon set (see EMOJI_CATEGORIES). |
| crafterName | string | Nie | - | - |
| background | Background | Nie | - | A preset background id for the workshop's poster. The id → CSS mapping is owned by the frontend. |
| customBackground | WorkshopCustomBackground | Nie | - | A freeform solid or gradient background overriding the preset `background` id, or null for no override. |
| titleFont | TitleFont | Nie | - | A preset title font id for the workshop's poster. The id → font mapping is owned by the frontend. |
| accentColor | HexColor | null | Nie | - | - |
Przykład
{
"tagline": "Solid-wood furniture, built to order",
"accentColor": "#6D5BD0"
}Odpowiedzi
200Success
| Pole | Typ | Wymagane | Ograniczenia | Opis |
|---|
| id | string | Tak | - | - |
| name | string | Tak | - | - |
| tagline | string | Tak | - | - |
| logo | string | Tak | - | One emoji from the curated icon set |
| crafterName | string | Tak | - | - |
| crafterAvatarSeed | string | Tak | - | - |
| background | Background | Tak | - | A preset background id for the workshop's poster. The id → CSS mapping is owned by the frontend. |
| customBackground | WorkshopCustomBackground | Nie | - | A freeform solid or gradient background overriding the preset `background` id, or null for no override. |
| titleFont | TitleFont | Tak | - | A preset title font id for the workshop's poster. The id → font mapping is owned by the frontend. |
| accentColor | HexColor | null | Nie | - | - |
| plan | WorkshopPlan | Tak | - | The workshop's resolved plan; an expired time-boxed Pro reads back as free. |
| planExpiresAt | string | null | Nie | - | Set while `plan` is a time-boxed Pro (a trial or a paid subscription's current period); null on a permanent plan |
| planSource | WorkshopPlanSource | null | Nie | - | - |
| context | WorkshopContext | Nie | - | The workshop's context notes as stored: free text describing the workshop and the moment the server last saved them. |
| contextDerived | WorkshopContextDerived | Nie | - | The AI-synthesized summary and suggested intents distilled from the workshop's context notes. |
| isDefault | boolean | Tak | - | - |
| members | array of WorkshopMember | Tak | - | - |
| createdAt | string | Tak | format: "date-time" | - |
Przykład
{
"id": "workshop-1",
"name": "Extremely Awesome Workshop",
"tagline": "Solid-wood furniture, built to order",
"logo": "🛠️",
"crafterName": "Kamil",
"crafterAvatarSeed": "uid-1",
"background": "paper",
"titleFont": "sans",
"accentColor": "#6D5BD0",
"plan": "free",
"planExpiresAt": null,
"planSource": null,
"isDefault": true,
"members": [
{
"id": "uid-1",
"name": "Kamil",
"avatarSeed": "uid-1",
"role": "owner"
}
],
"createdAt": "2026-07-04T00:00:00.000Z"
}400The request body does not match the schema
Wspólna treść błędu walidacji, zobacz Błędy walidacji.
401Not authenticated
Brak treści.
403Forbidden
Brak treści.
404Not found
Brak treści.
Przykładowe żądanie
curl -X PATCH 'https://mercastra.cloud/api/workshops/<workshopId>' \
-H 'Cookie: session=<session cookie>' \
-H 'X-CSRF-Token: <csrf-token cookie value>' \
-H 'Content-Type: application/json' \
-d '{"tagline":"Solid-wood furniture, built to order","accentColor":"#6D5BD0"}'