curl --request POST \
--url http://localhost:8080/inbox-views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": {},
"group_by_attribute": "<string>",
"shared_with_user_ids": [],
"shared_with_team_ids": []
}
'import requests
url = "http://localhost:8080/inbox-views"
payload = {
"name": "<string>",
"filters": {},
"group_by_attribute": "<string>",
"shared_with_user_ids": [],
"shared_with_team_ids": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
filters: {},
group_by_attribute: '<string>',
shared_with_user_ids: [],
shared_with_team_ids: []
})
};
fetch('http://localhost:8080/inbox-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/inbox-views",
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([
'name' => '<string>',
'filters' => [
],
'group_by_attribute' => '<string>',
'shared_with_user_ids' => [
],
'shared_with_team_ids' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:8080/inbox-views"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:8080/inbox-views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/inbox-views")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filters": {
"date": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"preset": "today"
},
"channels": [
"web"
],
"status": [
1073741823
],
"sub_status_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"ai_closure": [
"assumed_resolved"
],
"sentiment": [
"angry"
],
"assignees": [
1073741823
],
"team_ids": [
"<string>"
],
"support_team_ids": [
"<string>"
],
"contact_ids": [
"<string>"
],
"ticket_number": 1073741823,
"language": [
"<string>"
],
"tags": [
"<string>"
],
"waiting_on": "customers",
"custom_data": [
{}
]
},
"advanced": true,
"sort_by": "last_message_at",
"sort_order": "asc",
"group_by": "tags",
"group_by_attribute": "<string>",
"shared_with_user_ids": [
0
],
"shared_with_team_ids": [
"<string>"
],
"visibility": "organization",
"created_by_user_id": 0,
"can_edit": true,
"can_delete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Create a saved inbox view
Save a named, filtered view of the inbox and share it with the organization, named teams, or named users.
curl --request POST \
--url http://localhost:8080/inbox-views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": {},
"group_by_attribute": "<string>",
"shared_with_user_ids": [],
"shared_with_team_ids": []
}
'import requests
url = "http://localhost:8080/inbox-views"
payload = {
"name": "<string>",
"filters": {},
"group_by_attribute": "<string>",
"shared_with_user_ids": [],
"shared_with_team_ids": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
filters: {},
group_by_attribute: '<string>',
shared_with_user_ids: [],
shared_with_team_ids: []
})
};
fetch('http://localhost:8080/inbox-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/inbox-views",
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([
'name' => '<string>',
'filters' => [
],
'group_by_attribute' => '<string>',
'shared_with_user_ids' => [
],
'shared_with_team_ids' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:8080/inbox-views"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:8080/inbox-views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/inbox-views")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"filters\": {},\n \"group_by_attribute\": \"<string>\",\n \"shared_with_user_ids\": [],\n \"shared_with_team_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filters": {
"date": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"preset": "today"
},
"channels": [
"web"
],
"status": [
1073741823
],
"sub_status_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"ai_closure": [
"assumed_resolved"
],
"sentiment": [
"angry"
],
"assignees": [
1073741823
],
"team_ids": [
"<string>"
],
"support_team_ids": [
"<string>"
],
"contact_ids": [
"<string>"
],
"ticket_number": 1073741823,
"language": [
"<string>"
],
"tags": [
"<string>"
],
"waiting_on": "customers",
"custom_data": [
{}
]
},
"advanced": true,
"sort_by": "last_message_at",
"sort_order": "asc",
"group_by": "tags",
"group_by_attribute": "<string>",
"shared_with_user_ids": [
0
],
"shared_with_team_ids": [
"<string>"
],
"visibility": "organization",
"created_by_user_id": 0,
"can_edit": true,
"can_delete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}group_by: "tags" to group by tags. For contact_attribute or
session_attribute, also set group_by_attribute to the exact key. Grouping
applies to loaded sessions in the inbox. See grouping saved views.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Name shown in the inbox view picker
1 - 100Filters the view applies, ANDed together. Omit for a view over every session. Same vocabulary as POST /chat/sessions/filter, plus the saved-view-only $current_user assignee token and rolling date.preset.
Show child attributes
Show child attributes
Sort field (default: last_message_at)
last_message_at, created_at, sla_urgency, snoozed_until Sort direction (default: desc)
asc, desc Group the session list by this field. Omit for a flat list.
tags, contact_attribute, session_attribute, channel, assignee_id, status, ai_closure_type, language, inbox_id Exact attribute key for contact_attribute or session_attribute grouping. Missing or empty leaves the list ungrouped.
User ids the view is shared with. Leave both share lists empty to share the view with the whole organization. Name users and/or teams to restrict it to them, or pass only your own user id to keep it private. Sharing requires the sessions-shared-views:write permission — without it a created view is locked to its creator and the share lists on an update are ignored.
-9007199254740991 <= x <= 9007199254740991Team ids (from GET /teams) whose members can see the view.
Response
Default Response
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Name shown in the inbox view picker
The saved filter set. null when advanced is true — the view uses filters this API cannot express.
Show child attributes
Show child attributes
True when the view was built in the dashboard with OR/exclude groups or filters outside this API's vocabulary. Its filters read back as null, and updating filters on it REPLACES the whole saved query with the simple set you send.
Sort field the view opens with
last_message_at, created_at, sla_urgency, snoozed_until Sort direction the view opens with
asc, desc Field sessions are grouped by in the list, when the view groups them
tags, contact_attribute, session_attribute, channel, assignee_id, status, ai_closure_type, language, inbox_id Exact attribute key for contact or session attribute grouping, or null when no key is set.
User ids the view is shared with. Empty (with no teams) means the whole org.
-9007199254740991 <= x <= 9007199254740991Team ids the view is shared with. Empty (with no users) means the whole org.
organization, personal, restricted -9007199254740991 <= x <= 9007199254740991Whether the calling user may update this view
Whether the calling user may delete this view
Was this page helpful?