import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const chatThread of client.applications.chatThreads.list('application_variant_id')) {
console.log(chatThread.id);
}[
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"thread_metadata": {},
"archived_at": "2023-11-07T05:31:56Z"
}
]import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const chatThread of client.applications.chatThreads.list('application_variant_id')) {
console.log(chatThread.id);
}[
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"thread_metadata": {},
"archived_at": "2023-11-07T05:31:56Z"
}
]Include archived threads in the response.
Successful Response
The ID of the account that owns the given entity.
The user who originally created the entity.
The type of identity that created the entity.
user, service_account The date and time when the entity was created in ISO format.
The date and time when the entity was last updated in ISO format.
The date and time when the entity was archived in ISO format.