Editing and deleting posts

Referencing previously archived Events

When an Event is archived and then later edited or deleted, you can send a new request to capture that change in the Archive as follows:

  • For the edited or deleted content request, use the same threadId from the original post
  • (Optional) Send both the previous and new content, using the content and originalContent properties, in the same API request.

Use this same approach for capturing user reactions and replies on posts.

Editing previous Events

When a user changes the content of a post, set the eventType to Post Edited to capture it.

Highlighting content changes

To highlight a content change when viewing the archived message, send the originalContent property in your Post Edited Event.

In this example, the status of a Jira issue changed from “To do” to “In progress”. To highlight this change, the cards.title value is “Jira Issue Updated”, which helps users identify the update in the Archive.

{
  "cards": [
    {
      "title": "Jira Issue Updated",
      "sections": [
        {
          "events": [
            {
              "eventTime": "2024-02-02T09:30:00Z",
              "user": {
                "identifier": "lily.lee@greenvaultcapital.com",
                "displayName": "Lily Lee"
              },
              "eventType": "Post Edited",
              "eventFields": [
                {
                  "fieldTitle": "Status",
                  "fieldValues": [
                    {
                      "content": {
                        "text": "In progress",
                        "textType": "plain"
                      },
                      "originalContent": {
                        "text": "To do",
                        "textType": "plain"
                      }
                    }
                  ]
                },
                {
                  "fieldTitle": "IssueId",
                  "fieldValues": [
                    {
                      "content": {
                        "text": "AB-1234",
                        "textType": "plain"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Send a consistent threadId to retrieve previously archived Events for this issue. 

Referencing original posts

For Events related to the same issue, send the same threadId to associate the new Events with the previously archived messages.

In this example, the threadId of the original post is referenced, but not the original post content.

{
  "overview": {
    "owner": {},
    "threadId": "jira-issue:AB-1234"
  },
  "cards": [
    {
      "title": "Jira Issue Updated",
      "sections": [
        {
          "events": [
            {
              "eventTime": "2024-02-02T10:30:00Z",
              "user": {
                "identifier": "lily.lee@greenvaultcapital.com",
                "displayName": "Lily Lee"
              },
              "eventType": "Post Edited",
              "eventFields": [
                {
                  "fieldTitle": "Status",
                  "fieldValues": [
                    {
                      "content": {
                        "text": "In progress",
                        "textType": "plain"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

This request creates a new archived message, which displays only the edited data. To find the original post, use the Group by conversation functionality.

Deleting a post or issue

If a user deletes a post which has previously been archived, set the eventType to “Post Deleted”.

This request captures the delete Event; data will not be deleted from your Archive.

{
  "overview": {
    "owner": {},
    "threadId": "jira-issue:AB-1234"
  },
  "cards": [
    {
      "title": "Issue deleted",
      "sections": [
        {
          "events": [
            {
              "eventTime": "2024-03-03T08:30:00Z",
              "user": {
                "identifier": "raj.patel@greenvaultcapital.com",
                "displayName": "Raj Patel"
              },
              "eventType": "Post Deleted",
              "eventFields": [
                {
                  "fieldTitle": "IssueId",
                  "fieldValues": [
                    {
                      "content": {
                        "text": "AB-1234",
                        "textType": "plain"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}