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
| Call | What it does |
|---|---|
GET /posts | Lists the case's updates, newest first |
POST /posts | Posts 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/templates | Lists your feed templates, filled in for this case |
GET /posts/<post_id>/comments | Lists an update's comments, newest first |
POST /posts/<post_id>/comments | Comments 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
| Field | What it does | Required | Default |
|---|---|---|---|
message | The update's text, up to 20,000 characters. Line breaks are kept. | Yes | — |
permissions | The 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. | No | Everyone |
template | A feed template to bring files from: {"owner": "host", "template_id": "<asset_id>"} | No | None |
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 fromGET /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 withFieldRequiredExceptionatmessage, 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:
| Field | What it holds |
|---|---|
post_id, case_id | Its IDs |
user_id | Who posted it. The Virtual Assistant's ID is cu- and your hub ID's 14 characters. |
message | Its text, with mentions as <@user_id> |
permissions | The roles that may see it, when it's limited |
media, media_ct | Its files, by kind, and how many |
comments_ct, commenters, last_reply | Its comments: how many, who wrote them and when the last came |
system | true for an update an automation or import posted |
language | The language it was written in, when it records one |
created_on, updated_on | When 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>takesmessageandpermissions, 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 receivemodify_postwhen 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 receivedelete_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
| Status | message | Why |
|---|---|---|
| 400 | SchemaFieldsException | A 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. |
| 400 | SchemaFieldsException, with ItemCopyNotAllowedException at template | The template isn't published, isn't open to the Bots role, or its files are still being processed |
| 403 | ItemAuthorOnlyException | The key tried to change an update or comment someone else wrote |
| 403 | CaseClosedException | The case is closed |
| 403 | BotNotAllowedException | A key called one of the AI drafting calls |
| 404 | ItemNotFoundException | The 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.