Skip to main content
PATCH
/
threads
/
{threadId}
JavaScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});

const thread = await client.threads.update('thr_01kabn43yqyxn2bx4ve84mczd3');

console.log(thread.id);
{
  "data": {
    "id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Path Parameters

threadId
string
required

The id of the thread

Example:

"thr_01kabn43yqyxn2bx4ve84mczd3"

Body

application/json

Labels to add/remove and optional agent assignment.

addLabels
string[]

Labels to add to all messages in the thread.

A label name.

Minimum string length: 1
removeLabels
string[]

Labels to remove from all messages in the thread.

A label name.

Minimum string length: 1
agentId
string | null

The AI agent identifier.

Response

Successful response.

data
object
required