Create a community
const url = 'https://feed.work.optidata.cloud/api/categories';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Announcements","emoji":"📣","description":"Company-wide announcements.","color":"#863bff","is_private":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://feed.work.optidata.cloud/api/categories \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Announcements", "emoji": "📣", "description": "Company-wide announcements.", "color": "#863bff", "is_private": false }'Creates a community. Only company administrators may do this; others get 403. For a private community (is_private: true), allowed_members lists who it is shared with and what each may do.
Authorizations
Section titled “Authorizations”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": "Company-wide announcements.", "color": "#863bff", "is_private": false}Responses
Section titled “ Responses ”The community was created.
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": "Company-wide announcements.", "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."}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." ] }}