import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const chatThread = await client.chatThreads.update('thread_id');
console.log(chatThread.id);
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"thread_metadata": {},
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const chatThread = await client.chatThreads.update('thread_id');
console.log(chatThread.id);
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"thread_metadata": {},
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
Successful Response
The response is of type object
.