Create a post in the general feed
const url = 'https://feed.work.optidata.cloud/api/posts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content":"{\"ops\":[{\"insert\":\"Hello, company!\\n\"}]}","status":"published"}'};
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/posts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "content": "{\"ops\":[{\"insert\":\"Hello, company!\\n\"}]}", "status": "published" }'Publishes (or drafts/schedules) a post with no community, in the general feed. Send content as a JSON-encoded Quill delta, or a hero_type with its payload.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A post to create.
object
A JSON-encoded array of tag names, e.g. "[\"hr\"]".
Required when status is scheduled; a future time.
The kind of rich hero the post carries, or null.
Required when hero_type is link.
Required when hero_type is poll: a JSON-encoded object with question
(string), duration_days (one of 1, 3, 7, 14) and options (2 to 15
strings of at most 70 characters), e.g.
"{\"question\":\"Lunch?\",\"duration_days\":3,\"options\":[\"Pizza\",\"Sushi\"]}".
Required when hero_type is embed.
Required when hero_type is attachment: a JSON-encoded array of Drive
files. Each entry carries identifier (string), source
(SOURCE_OPTIWORK_DRIVE or SOURCE_USER_FILE_SYSTEM), mime_type (string),
size_bytes (integer, ≥ 0) and meta — the Drive node, at least its id.
The caller must be able to read the node; name, MIME type and size are
then taken from Drive.
A post to create.
object
A JSON-encoded Quill delta. Required unless a hero_type is given.
A JSON-encoded array of tag names, e.g. "[\"hr\"]".
Required when status is scheduled; a future time.
Required when hero_type is link.
Required when hero_type is poll: a JSON-encoded object with question
(string), duration_days (one of 1, 3, 7, 14) and options (2 to 15
strings of at most 70 characters), e.g.
"{\"question\":\"Lunch?\",\"duration_days\":3,\"options\":[\"Pizza\",\"Sushi\"]}".
Required when hero_type is embed.
Required when hero_type is attachment: a JSON-encoded array of Drive
files. Each entry carries identifier (string), source
(SOURCE_OPTIWORK_DRIVE or SOURCE_USER_FILE_SYSTEM), mime_type (string),
size_bytes (integer, ≥ 0) and meta — the Drive node, at least its id.
The caller must be able to read the node; name, MIME type and size are
then taken from Drive.
Examples
{ "content": "{\"ops\":[{\"insert\":\"Hello, company!\\n\"}]}", "status": "published"}Responses
Section titled “ Responses ”The created post.
A post in a community or the general feed.
object
The community, or null in the general feed.
A JSON-encoded Quill delta.
Link preview metadata, for a link hero.
The kind of rich hero the post carries, or null.
A user of the company.
object
Identifier of the company.
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
A tag that labels posts.
object
A poll attached to a post.
object
object
A file attached to a post.
object
object
A user of the company.
object
Identifier of the company.
A comment on a post.
object
A JSON-encoded Quill delta.
A user of the company.
object
Identifier of the company.
Examples
{ "id": 2289, "category_id": null, "user_id": 38, "title": null, "content": "{\"ops\":[{\"insert\":\"Welcome to the team!\\n\"}]}", "type": "text", "meta": null, "created_at": "2026-10-19T14:38:26.000000Z", "updated_at": "2026-10-19T14:38:26.000000Z", "deleted_at": null, "hero_url": null, "hero_type": null, "pinned_at": null, "status": "published", "published_at": "2026-10-19T14:38:26.000000Z", "images_count": null, "hero_thumbnail_url": null, "hero_embeds": null, "globally_pinned_at": null, "comments_count": 0, "reacting_users_count": 0, "has_hero": false, "has_tags": false, "is_pinned": false, "is_globally_pinned": false, "reaction_summary": [], "user": { "id": 38, "uuid": "9ba64b0e-69b4-4639-a01b-4ac5c5f70a24", "cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a", "username": "ana.souza@example.com", "email": "ana.souza@example.com", "name": "Ana Souza", "company_name": "Acme", "role": "user", "status": "active", "created_at": "2026-03-25T19:47:41.000000Z", "updated_at": "2026-09-16T17:25:41.000000Z", "deleted_at": null, "avatar_url": "https://media.optidata.cloud/avatars/ana.webp", "settings": { "language": "pt_BR", "language_source": "company", "theme": "light", "timezone": null, "user_id": 214 } }, "tags": [], "category": 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." ] }}