Record an account search query
curl --request POST \
--url https://api-v2.watchcollect.com/v2/search/history \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api-v2.watchcollect.com/v2/search/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-v2.watchcollect.com/v2/search/history"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"query": "<string>",
"searched_at_ms": 123,
"search_count": 2
}
]
}{
"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"
}
}search
Record an account search query
Upserts a submitted search query for the authenticated Clerk user and trims the account history to the latest five entries.
POST
/
v2
/
search
/
history
Record an account search query
curl --request POST \
--url https://api-v2.watchcollect.com/v2/search/history \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api-v2.watchcollect.com/v2/search/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-v2.watchcollect.com/v2/search/history"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"query": "<string>",
"searched_at_ms": 123,
"search_count": 2
}
]
}{
"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"
}
}