Update a community
const url = 'https://feed.work.optidata.cloud/api/categories/864';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Announcements","emoji":"📣","description":"Edited.","is_private":true,"allowed_members":[{"member_id":63,"member_type":"App\\Models\\User","actions":"interact"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://feed.work.optidata.cloud/api/categories/864 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Announcements", "emoji": "📣", "description": "Edited.", "is_private": true, "allowed_members": [ { "member_id": 63, "member_type": "App\\Models\\User", "actions": "interact" } ] }'Renames or reconfigures a community. The body is a full replacement: a field left out is reset to its default, so send the whole community. Allowed to administrators and, on a private community, to people with the manage permission; communities linked to a group cannot be edited here.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the community.
Request Bodyrequired
Section titled “Request Bodyrequired”A community to create or replace.
object
Hex colour such as #863bff.
A cover image, base64-encoded.
true makes the community private; allowed_members is then required.
Who the private community is shared with.
One member a private community is shared with.
object
Whether a shared member is a user or a group.
What a member may do in a community.
Examples
{ "name": "Announcements", "emoji": "📣", "description": "Edited.", "is_private": true, "allowed_members": [ { "member_id": 63, "member_type": "App\\Models\\User", "actions": "interact" } ]}Responses
Section titled “ Responses ”The updated community.
A community (shared space) for posts.
object
Hex colour, or null.
public — everyone in the company; private — only the people and groups it is shared with.
Set when the community mirrors an Optiwork group; such communities are managed through the group, not here.
Present when the community is returned as a pinned community.
object
Examples
{ "id": 864, "cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a", "name": "Announcements", "slug": "announcements", "description": "Edited.", "created_at": "2026-09-02T12:10:14.000000Z", "updated_at": "2026-09-02T12:10:14.000000Z", "deleted_at": null, "emoji": "📣", "cover_url": null, "color": "#863bff", "visibility": "public", "group_id": null}No authentication key was sent.
Authentication failures use an error key.
object
Examples
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not allowed to perform this action.
object
Examples
{ "message": "This action is unauthorized."}No matching resource, or it is not reachable through this path.
object
Examples
{ "message": "No query results for model [App\\Models\\Category] 864"}The authentication key is expired or not recognised. Get a fresh one and retry.
Authentication failures use an error key.
object
Examples
{ "error": "JWT passport expired: Passport expired"}The request failed validation.
object
The first validation message.
Messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}