Skip to content

Update a community

PATCH
/categories/{category}
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.

category
required
integer

Numeric id of the community.

Media typeapplication/json

A community to create or replace.

object
name
required
string
<= 255 characters
emoji
string | null
<= 255 characters
description
string | null
<= 255 characters
color

Hex colour such as #863bff.

string | null
cover_img_base64

A cover image, base64-encoded.

string | null
is_private

true makes the community private; allowed_members is then required.

boolean
allowed_members

Who the private community is shared with.

Array<object>

One member a private community is shared with.

object
member_id
required
integer
member_type
required

Whether a shared member is a user or a group.

string
Allowed values: App\Models\User App\Models\Group
actions
required

What a member may do in a community.

string
Allowed values: none view interact edit manage
Examples
Exampleexample
{
"name": "Announcements",
"emoji": "📣",
"description": "Edited.",
"is_private": true,
"allowed_members": [
{
"member_id": 63,
"member_type": "App\\Models\\User",
"actions": "interact"
}
]
}

The updated community.

Media typeapplication/json

A community (shared space) for posts.

object
id
required
integer
cuid
string
name
required
string
slug
required
string
description
string | null
emoji
string | null
cover_url
string | null
color

Hex colour, or null.

string | null
visibility
required

public — everyone in the company; private — only the people and groups it is shared with.

string
Allowed values: public private
group_id

Set when the community mirrors an Optiwork group; such communities are managed through the group, not here.

integer | null
created_at
string format: date-time
updated_at
string format: date-time
deleted_at
string | null format: date-time
pivot

Present when the community is returned as a pinned community.

object
key
additional properties
any
Examples
Exampleexample
{
"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.

Media typeapplication/json

Authentication failures use an error key.

object
error
required
string
Examples
Exampleexample
{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller is not allowed to perform this action.

Media typeapplication/json
object
message
required
string
Examples
Exampleexample
{
"message": "This action is unauthorized."
}

No matching resource, or it is not reachable through this path.

Media typeapplication/json
object
message
required
string
Examples
Exampleexample
{
"message": "No query results for model [App\\Models\\Category] 864"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key.

object
error
required
string
Examples
Exampleexample
{
"error": "JWT passport expired: Passport expired"
}

The request failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleexample
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}