Create a custom filter
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Filter', type: 'conversation', query: {}})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters"
payload = {
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"type": "conversation",
"query": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Custom Filters
Create a custom filter
Create a custom filter in the account
POST
/
api
/
v1
/
accounts
/
{account_id}
/
custom_filters
Create a custom filter
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Filter', type: 'conversation', query: {}})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/custom_filters"
payload = {
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"type": "conversation",
"query": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Path Parameters
The numeric ID of the account
Query Parameters
The type of custom filter
Available options:
conversation, contact, report Body
application/json
Response
Success
The ID of the custom filter
The name of the custom filter
The description about the custom filter
Available options:
conversation, contact, report A query that needs to be saved as a custom filter
The time at which the custom filter was created
The time at which the custom filter was updated