Update a custom filter
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Filter', type: 'conversation', query: {}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}"
payload = {
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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
Update a custom filter
Update a custom filter’s attributes
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
custom_filters
/
{custom_filter_id}
Update a custom filter
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'My Custom Filter', type: 'conversation', query: {}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}"
payload = {
"name": "My Custom Filter",
"type": "conversation",
"query": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
The numeric ID of the account
The numeric ID of the custom filter
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