Conversations Filter
Filter conversations with custom filter options and pagination
POST
/
api
/
v1
/
accounts
/
{account_id}
/
conversations
/
filter
Conversations Filter
curl --request POST \
--url https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"payload": [
{
"attribute_key": "browser_language",
"filter_operator": "not_equal_to",
"values": [
"en"
],
"query_operator": "AND"
},
{
"attribute_key": "status",
"filter_operator": "equal_to",
"values": [
"pending"
],
"query_operator": null
}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payload: [
{
attribute_key: 'browser_language',
filter_operator: 'not_equal_to',
values: ['en'],
query_operator: 'AND'
},
{
attribute_key: 'status',
filter_operator: 'equal_to',
values: ['pending'],
query_operator: null
}
]
})
};
fetch('https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter"
payload = { "payload": [
{
"attribute_key": "browser_language",
"filter_operator": "not_equal_to",
"values": ["en"],
"query_operator": "AND"
},
{
"attribute_key": "status",
"filter_operator": "equal_to",
"values": ["pending"],
"query_operator": None
}
] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
[
'attribute_key' => 'browser_language',
'filter_operator' => 'not_equal_to',
'values' => [
'en'
],
'query_operator' => 'AND'
],
[
'attribute_key' => 'status',
'filter_operator' => 'equal_to',
'values' => [
'pending'
],
'query_operator' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter"
payload := strings.NewReader("{\n \"payload\": [\n {\n \"attribute_key\": \"browser_language\",\n \"filter_operator\": \"not_equal_to\",\n \"values\": [\n \"en\"\n ],\n \"query_operator\": \"AND\"\n },\n {\n \"attribute_key\": \"status\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\n \"pending\"\n ],\n \"query_operator\": null\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": [\n {\n \"attribute_key\": \"browser_language\",\n \"filter_operator\": \"not_equal_to\",\n \"values\": [\n \"en\"\n ],\n \"query_operator\": \"AND\"\n },\n {\n \"attribute_key\": \"status\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\n \"pending\"\n ],\n \"query_operator\": null\n }\n ]\n}")
.asString();{
"data": {
"meta": {
"mine_count": 1,
"unassigned_count": 1,
"assigned_count": 1,
"all_count": 1
},
"payload": [
{
"id": 1,
"messages": [
{
"id": 1,
"content": "Sample text",
"account_id": 1,
"inbox_id": 1,
"conversation_id": 1,
"message_type": 0,
"created_at": 1,
"updated_at": 1,
"private": true,
"status": "sent",
"source_id": 1,
"content_type": "text"
}
],
"account_id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"additional_attributes": {
"source": "api",
"segment": "enterprise"
},
"agent_last_seen_at": 1,
"assignee_last_seen_at": 1,
"can_reply": true,
"contact_last_seen_at": 1,
"custom_attributes": {
"source": "api",
"segment": "enterprise"
},
"inbox_id": 1,
"labels": [
[
"support"
]
],
"meta": {
"sender": {
"additional_attributes": {
"source": "api",
"segment": "enterprise"
},
"availability_status": "open",
"email": "agent@example.com",
"id": 1,
"name": "Sample resource",
"phone_number": "+15551234567",
"blocked": true,
"identifier": "Sample text",
"thumbnail": "Sample text",
"custom_attributes": {
"source": "api",
"segment": "enterprise"
},
"last_activity_at": 1,
"created_at": 1
},
"channel": "Sample text",
"assignee": {
"id": 1,
"access_token": "Sample text",
"account_id": 1,
"available_name": "Sample resource",
"avatar_url": "https://example.com/resource",
"confirmed": true,
"display_name": "Sample resource",
"message_signature": "Sample text",
"email": "agent@example.com",
"hmac_identifier": "Sample text",
"inviter_id": 1,
"name": "Sample resource"
},
"hmac_verified": true
}
}
]
}
}{
"error": "Bad request"
}Autorizações
Parâmetros de consulta
Sort filtered conversations using the same options as the conversation list.
Opções disponíveis:
last_activity_at_asc, last_activity_at_desc, created_at_asc, created_at_desc, priority_asc, priority_desc, waiting_since_asc, waiting_since_desc, priority_desc_created_at_asc, unread Corpo
application/json
⌘I
Conversations Filter
curl --request POST \
--url https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"payload": [
{
"attribute_key": "browser_language",
"filter_operator": "not_equal_to",
"values": [
"en"
],
"query_operator": "AND"
},
{
"attribute_key": "status",
"filter_operator": "equal_to",
"values": [
"pending"
],
"query_operator": null
}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payload: [
{
attribute_key: 'browser_language',
filter_operator: 'not_equal_to',
values: ['en'],
query_operator: 'AND'
},
{
attribute_key: 'status',
filter_operator: 'equal_to',
values: ['pending'],
query_operator: null
}
]
})
};
fetch('https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter"
payload = { "payload": [
{
"attribute_key": "browser_language",
"filter_operator": "not_equal_to",
"values": ["en"],
"query_operator": "AND"
},
{
"attribute_key": "status",
"filter_operator": "equal_to",
"values": ["pending"],
"query_operator": None
}
] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
[
'attribute_key' => 'browser_language',
'filter_operator' => 'not_equal_to',
'values' => [
'en'
],
'query_operator' => 'AND'
],
[
'attribute_key' => 'status',
'filter_operator' => 'equal_to',
'values' => [
'pending'
],
'query_operator' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter"
payload := strings.NewReader("{\n \"payload\": [\n {\n \"attribute_key\": \"browser_language\",\n \"filter_operator\": \"not_equal_to\",\n \"values\": [\n \"en\"\n ],\n \"query_operator\": \"AND\"\n },\n {\n \"attribute_key\": \"status\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\n \"pending\"\n ],\n \"query_operator\": null\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://chat.wiseapp360.com/api/v1/accounts/{account_id}/conversations/filter")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": [\n {\n \"attribute_key\": \"browser_language\",\n \"filter_operator\": \"not_equal_to\",\n \"values\": [\n \"en\"\n ],\n \"query_operator\": \"AND\"\n },\n {\n \"attribute_key\": \"status\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\n \"pending\"\n ],\n \"query_operator\": null\n }\n ]\n}")
.asString();{
"data": {
"meta": {
"mine_count": 1,
"unassigned_count": 1,
"assigned_count": 1,
"all_count": 1
},
"payload": [
{
"id": 1,
"messages": [
{
"id": 1,
"content": "Sample text",
"account_id": 1,
"inbox_id": 1,
"conversation_id": 1,
"message_type": 0,
"created_at": 1,
"updated_at": 1,
"private": true,
"status": "sent",
"source_id": 1,
"content_type": "text"
}
],
"account_id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"additional_attributes": {
"source": "api",
"segment": "enterprise"
},
"agent_last_seen_at": 1,
"assignee_last_seen_at": 1,
"can_reply": true,
"contact_last_seen_at": 1,
"custom_attributes": {
"source": "api",
"segment": "enterprise"
},
"inbox_id": 1,
"labels": [
[
"support"
]
],
"meta": {
"sender": {
"additional_attributes": {
"source": "api",
"segment": "enterprise"
},
"availability_status": "open",
"email": "agent@example.com",
"id": 1,
"name": "Sample resource",
"phone_number": "+15551234567",
"blocked": true,
"identifier": "Sample text",
"thumbnail": "Sample text",
"custom_attributes": {
"source": "api",
"segment": "enterprise"
},
"last_activity_at": 1,
"created_at": 1
},
"channel": "Sample text",
"assignee": {
"id": 1,
"access_token": "Sample text",
"account_id": 1,
"available_name": "Sample resource",
"avatar_url": "https://example.com/resource",
"confirmed": true,
"display_name": "Sample resource",
"message_signature": "Sample text",
"email": "agent@example.com",
"hmac_identifier": "Sample text",
"inviter_id": 1,
"name": "Sample resource"
},
"hmac_verified": true
}
}
]
}
}{
"error": "Bad request"
}