React to a post
const url = 'https://feed.work.optidata.cloud/api/posts/2289/reactions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reaction":"like"}'};
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/2289/reactions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reaction": "like" }'Adds or changes the caller’s reaction to the post. Requires permission to interact in the community.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the post.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The reaction to apply. Currently like.
Examples
{ "reaction": "like"}Responses
Section titled “ Responses ”The post with the reaction counted.
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": 864, "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": 1, "reacting_users_count": 2, "has_hero": false, "has_tags": true, "is_pinned": false, "is_globally_pinned": false, "reaction_summary": { "like": 1 }, "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": [ { "id": 89, "name": "hr", "slug": "hr", "color": "success" } ], "category": { "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."}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." ] }}