Help centerIntegrations

Post updates and comments with a hub key

Post updates to a case's feed, reply with comments, and read, edit or delete them from your own software, as the Virtual Assistant.

In this article10 sections

This page covers posting and reading a case's updates and comments with a hub key. Paths are under https://prd-api-app.caseactive.com/v1/<hub id>/<case id>.

Calls

CallWhat it does
GET /postsLists the case's updates, newest first
POST /postsPosts an update
GET /posts/<post_id>Reads one update
PUT /posts/<post_id>Changes an update the key posted
DELETE /posts/<post_id>Deletes any update, with its comments
GET /posts/templatesLists your feed templates, filled in for this case
GET /posts/<post_id>/commentsLists an update's comments, newest first
POST /posts/<post_id>/commentsComments on an update
GET /posts/<post_id>/comments/<comment_id>Reads one comment
PUT /posts/<post_id>/comments/<comment_id>Changes a comment the key wrote
DELETE /posts/<post_id>/comments/<comment_id>Deletes any comment

Everything a key posts appears in the case's feedFeed The timeline of updates on a case, where the firm posts news and everyone on the case can comment. as your hub's Virtual AssistantVirtual Assistant An automated team member that posts welcome messages, check-ins and stage updates for the firm; its posts carry a Virtual Assistant badge., under your firm's name with the Virtual Assistant badge. To attach files, see Upload and attach files with a hub key. The AI drafting calls in the technical pages are for people in the portal: a key is refused with 403 BotNotAllowedException.

Posting an update

FieldWhat it doesRequiredDefault
messageThe update's text, up to 20,000 characters. Line breaks are kept.Yes—
permissionsThe rolesRole A set of permissions that decides what someone can see and do on a case, such as staff or clients. that may see it, such as ["role::staff"]. Leave it out for everyone on the case.NoEveryone
templateA feed template to bring files from: {"owner": "host", "template_id": "<asset_id>"}NoNone
curl -X POST https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cc-1a2b3c4d5e6f70/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Hi <@cu-4f1c2a9e8b7d60>, the insurer has acknowledged your claim. We expect their estimate within two weeks."}'

It answers 201 with the update's ID:

{"data": {"case_id": "cc-1a2b3c4d5e6f70", "post_id": "post::20261002154134_b0accfaac139a9", "selfLink": "https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cc-1a2b3c4d5e6f70/posts"}}
  • Text. Send plain text. The portal shows **bold**, [a link](https://example.com) and bare web addresses as formatted; emails show the text as written.
  • Mentions. Write <@user_id> to mention someone on the case, using the IDs from GET /team, or a designation code such as <@clients.primary>, which is filled in with the matching person. The portal shows each as @ and their first name. A mention of someone who isn't on the case, or a code nobody on it matches, is dropped. A message left with no words once they're dropped is refused, 400 with FieldRequiredException at message, and nothing is saved.
  • Who sees it. With permissions, only people in those roles see it, along with anyone whose role moderates updates, as staff's does by default.

Who is told

As soon as the update is posted:

  • With no mentions, everyone on the case who may see it is told. With mentions, only the people mentioned are.
  • Each is emailed the update, or texted if they have no confirmed email, and gets a portal notification. Disabled members, and people who've turned off update notifications, aren't.
  • Replying to the email adds the reply as a comment, from the person who replied.
  • Your webhooks receive add_post.

Files attached afterwards are counted in the email.

Posting from a template

GET /posts/templates lists your published feed templatesTemplate A reusable feed post, form, e-sign, note or task kept in the Library and copied onto cases., oldest first, with each one's asset_id, title and message. Designation codes in message are already filled in with the people on this case.

To post one, send its message, as it is or changed, and template with its asset_id to bring the template's files. A template doesn't bring its roles: send permissions yourself.

Reading updates

GET /posts takes limit (default 20, up to 1000) and start_key, and pages with nextLink and startKey as every list does. Each update holds:

FieldWhat it holds
post_id, case_idIts IDs
user_idWho posted it. The Virtual Assistant's ID is cu- and your hub ID's 14 characters.
messageIts text, with mentions as <@user_id>
permissionsThe roles that may see it, when it's limited
media, media_ctIts files, by kind, and how many
comments_ct, commenters, last_replyIts comments: how many, who wrote them and when the last came
systemtrue for an update an automation or import posted
languageThe language it was written in, when it records one
created_on, updated_onWhen it was posted and last changed, in UTC

A key reads every update on the case, limited ones included.

Editing and deleting

  • PUT /posts/<post_id> takes message and permissions, and changes only the ones you send. A key can change only updates the Virtual Assistant posted: its own, and the welcome, check-in and milestone updates your automations post. Nobody is told; your webhooks receive modify_post when the text changes.
  • To change who sees an update, send the full list of roles. An empty list is refused. To show it to everyone again, roles your hub adds later included, send "permissions": null; a list of every role leaves out roles added later.
  • DELETE /posts/<post_id> deletes any update on the case, with its comments and files. Nobody is told; your webhooks receive delete_post.

Comments

POST /posts/<post_id>/comments takes message, with the same rules as an update's, and answers 201 with the comment_id. Everyone who may see the update is told, as for an update, or only the people it mentions. GET lists them newest first, with comment_id, user_id, message, media and their times.

A key can change only its own comments, with PUT and a new message, and can delete any comment.

Webhooks

Your webhooks receive every change to updates and comments, the key's own included: add_post, modify_post, delete_post, add_post_media and delete_post_media, and the same five for comments. Each event's who.user_id is the author of the update or comment, so the key's own carry the Virtual Assistant's ID: check it, or your system will take its own updates back in as new. See Webhook events and payloads.

Language

A key's updates and comments record no language, so they're shown as written and never translated. An update made with a template that has a language is the exception: it's marked with the template's language, and translated for readers who use another. See Understand how updates and comments are translated.

If a call is refused

StatusmessageWhy
400SchemaFieldsExceptionA field is missing or invalid, such as an empty message, an empty permissions list or a role your hub doesn't have; errors names it. A change that names no field the call takes is refused the same way.
400SchemaFieldsException, with ItemCopyNotAllowedException at templateThe template isn't published, isn't open to the Bots role, or its files are still being processed
403ItemAuthorOnlyExceptionThe key tried to change an update or comment someone else wrote
403CaseClosedExceptionThe case is closed
403BotNotAllowedExceptionA key called one of the AI drafting calls
404ItemNotFoundExceptionThe update or comment doesn't exist, or belongs to another case

For the error body and the rest of the codes, see Handle API errors and status codes.

Related articles

Upload and attach files with a hub keyGet an upload address, upload a file, attach it to an update, note, task, form or e-sign, and download a case's files.IntegrationsHandle API errors and status codesRead the error body, what 400, 401, 403, 404, 500 and 503 mean, and why an item your key can't see answers 404.Integrations