Skip to content

Threads

Threads are conversations, optionally pinned to a position on the page.

List Threads

GET /api/v1/rooms/:roomId/threads
bash
curl https://pulse.hire.rest/api/v1/rooms/dashboard/threads \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

json
{
  "items": [
    {
      "id": "thread_abc",
      "roomId": "dashboard",
      "resolved": false,
      "positionX": 0.45,
      "positionY": 0.72,
      "createdAt": "2026-03-10T14:00:00.000Z",
      "updatedAt": "2026-03-10T14:05:00.000Z"
    }
  ]
}

Create Thread

POST /api/v1/rooms/:roomId/threads

Creates a thread with an initial comment. The thread appears instantly in all connected browsers.

bash
curl -X POST https://pulse.hire.rest/api/v1/rooms/dashboard/threads \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user-1",
    "body": "Deployment failed — see CI logs",
    "mentions": ["user-2"],
    "position": { "x": 0.5, "y": 0.3 }
  }'
FieldTypeRequiredDescription
userIdstringYesAuthor's user ID (must have connected before)
bodystringYesFirst comment text
mentionsstring[]NoUser IDs to @mention (sends notifications)
positionobjectNoPin position: { x, y, selector?, path? } — x/y are 0-1 range

Response 201:

json
{
  "thread": {
    "id": "thread_new",
    "roomId": "dashboard",
    "resolved": false,
    "position": { "x": 0.5, "y": 0.3 },
    "comments": [{
      "id": "comment_001",
      "userId": "user-1",
      "body": "Deployment failed — see CI logs",
      "mentions": ["user-2"],
      "createdAt": "2026-03-10T14:00:00.000Z"
    }],
    "createdAt": "2026-03-10T14:00:00.000Z"
  }
}

Use Case: CI Bot

Have your CI pipeline create a thread when a deployment fails. Users see it appear in the Pulse widget on the affected page.

Get Thread

GET /api/v1/threads/:threadId

Returns the thread with all its comments.

bash
curl https://pulse.hire.rest/api/v1/threads/thread_abc \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

json
{
  "thread": { "id": "thread_abc", "resolved": false, ... },
  "comments": [
    { "id": "comment_001", "userId": "user-1", "body": "Original comment", ... },
    { "id": "comment_002", "userId": "user-2", "body": "Reply here", ... }
  ]
}

Resolve / Reopen

PATCH /api/v1/threads/:threadId
bash
curl -X PATCH https://pulse.hire.rest/api/v1/threads/thread_abc \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{ "resolved": true }'

Response:

json
{ "threadId": "thread_abc", "resolved": true }

Delete Thread

DELETE /api/v1/threads/:threadId

Deletes the thread and all its comments. Disappears from all connected browsers.

bash
curl -X DELETE https://pulse.hire.rest/api/v1/threads/thread_abc \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

json
{ "deleted": true }

Pulse Collaboration SDK