Skip to content

Create a community

POST
/categories
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.

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": "Company-wide announcements.",
"color": "#863bff",
"is_private": false
}

The community was created.

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": "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.

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."
}

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."
]
}
}