Chatkit API versions

V6 (latest)

API reference

This release adds the capability of providing your own ids when creating rooms.

Migration guide

There should be no need to make changes to your code to upgrade to this version. However, the format of the generated room ids have changed in this version to use UUID's. If you are expecting room ids in the old format, you will need to make changes.

V5

API reference

This release changes the deletion endpoints for rooms and users from a synchronous to an asynchronous version.

The asynchronous endpoints makes it easier to create a responsive UI, while making the actual deletion more reliable. You can learn more about the new asynchronous deletion in the core concepts page.

Note although the impact should be minimal this is a breaking change in the API. See the guide below for migration instructions.

Migration guide

The previous version of the deletion endpoints required you to keep the connection open until the request had completed to make sure the operation succeeded. The new SDK methods are prefixed with async and will return immediately with a job id.

If you need to know if or when the resource is deleted you will need to store the job id returned from the endpoint. Here's an example using the Node.js SDK:

const res = await chatkit.asyncDeleteUser({
  userId: "someId",
})

while (
  (await chatkit.getDeleteStatus({ jobId: res.id }))
    .status === "in_progress"
) {
  console.log("User not deleted yet, sleeping..")
  await sleep(500)
}

console.log("User deleted successfully")

In most cases you don't need to wait for the job to complete. Clients will get a subscription event once the resource is deleted and will handle that automatically. If you poll for the job status, make sure to insert a delay between the API calls to avoid rate limiting.

V4

API reference

This release introduces unread message counts. The unread message count for a user is the difference between the user's read cursor and the latest message in the room. See the core concepts page for more information.

Migration guide

There's no breaking change in this release, but if you are using one of the possible work-arounds to implement unread counts you should consider upgrading. The unread count feature makes this simpler and more performant.

V3

API reference

This release introduces multipart messages, which enables various new features and use cases for message attachments.

Migration guide

See the separate page for migration guidance.

V2

API reference

This is a major rewrite of the API moving several features into user subscriptions. The main changes are:

  • Room ids are changed from integers to strings
  • Typing indicators and membersips are now in subscriptions

Migration guide

This is a major change with several breaking changes. We recommend a complete re-write if you are still using v1.

V1 (Obsolete)

This version of the API is no longer supported. You should upgrade to the latest version to avoid issues.