1. Threads And Channels
  2. Manage Users

Threads And Channels

Manage Users

You may want to manually add or remove users from a thread. Keep in mind this is only for internal users, not third party contacts. Third party contact are automatically added if they are linked to a resource in someway.

Add a user

While all users who have access to a resource can see a thread, adding a user explicitly will cause them to receive notifications for it.

POST `/v1/threads/:thread/subscribers`
js
        const data = {
  user_id: "jvQNFeVO4zdemfpPQ9U7AfDNdIx1",
};

fetch(`https://api.packagex.io/v1/threads/thrd_del_cv8ynU5WyJSEWHXAgSjcKt/subscribers`, {
  method: "POST",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(data),
});

      

Delete a user

If deleting a user just provide the ID to the URL.

DELETE `/v1/threads/:thread/subscribers/:subscriber`
js
        fetch(`https://api.packagex.io/v1/threads/thrd_del_cv8ynU5WyJSEWHXAgSjcKt/subscribers/jvQNFeVO4zdemfpPQ9U7AfDNdIx1`, {
  method: "DELETE",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(data),
});