Initialize a persisted assistant thread
curl --request POST \
--url https://api-v2.watchcollect.com/v2/agent/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({remoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api-v2.watchcollect.com/v2/agent/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-v2.watchcollect.com/v2/agent/threads"
payload = { "remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>"
}{
"error": {
"code": "invalid_payload",
"message": "event is required",
"request_id": "018f06e2-4f8d-7c01-8a0d-cc6fd78f7001"
}
}{
"error": {
"code": "invalid_payload",
"message": "event is required",
"request_id": "018f06e2-4f8d-7c01-8a0d-cc6fd78f7001"
}
}agent
Initialize a persisted assistant thread
Creates a thread row for the authenticated Clerk user, or returns the existing row when the remote id is already present for that user.
POST
/
v2
/
agent
/
threads
Initialize a persisted assistant thread
curl --request POST \
--url https://api-v2.watchcollect.com/v2/agent/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({remoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api-v2.watchcollect.com/v2/agent/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-v2.watchcollect.com/v2/agent/threads"
payload = { "remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"remoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>"
}{
"error": {
"code": "invalid_payload",
"message": "event is required",
"request_id": "018f06e2-4f8d-7c01-8a0d-cc6fd78f7001"
}
}{
"error": {
"code": "invalid_payload",
"message": "event is required",
"request_id": "018f06e2-4f8d-7c01-8a0d-cc6fd78f7001"
}
}