Tickets
List tickets
Return tickets for the organization. By default only non-spam tickets are included; pass is_spam=true to list spam tickets. Filter by requester with customer_id.
GET
/
organizations
/
{organization_id}
/
tickets
/
List tickets
curl --request GET \
--url https://api.initdesk.com/organizations/{organization_id}/tickets/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/{organization_id}/tickets/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/{organization_id}/tickets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.initdesk.com/organizations/{organization_id}/tickets/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-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"
"net/http"
"io"
)
func main() {
url := "https://api.initdesk.com/organizations/{organization_id}/tickets/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.initdesk.com/organizations/{organization_id}/tickets/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/{organization_id}/tickets/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"inbox": {
"id": 123,
"name": "<string>",
"email_prefix": "<string>",
"customer_interaction_style": "helpdesk"
},
"channel": {
"type": "<string>",
"connection_id": 123
},
"public_id": "<string>",
"customer": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"is_spam": true
},
"assignee": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"subject": "<string>",
"short_description": "<string>",
"sentiment_analysis_class": "positive",
"status": "created",
"waiting_on": "",
"classification": "",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"customer_visible_reply_count": 123,
"summary": "<string>",
"origin": "email",
"has_attachments": true,
"from_email": "jsmith@example.com",
"from_name": "<string>",
"snoozed_until": "2023-11-07T05:31:56Z",
"snoozed_by": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"last_snooze_ended_at": "2023-11-07T05:31:56Z",
"last_unsnooze_reason": "timer",
"merged_into": {
"id": 123,
"public_id": "<string>",
"subject": "<string>"
},
"merged_at": "2023-11-07T05:31:56Z",
"tags": [
{
"id": 123,
"name": "<string>",
"color": "<string>"
}
],
"language": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Authorizations
Path Parameters
Pattern:
^[-a-zA-Z0-9_]+$Query Parameters
Filter tickets by conversation channel type (e.g. email).
Filter tickets by requester (customer) ID.
When omitted, defaults to false (non-spam only). Set to true to list spam tickets.
Which field to use when ordering the results.
A page number within the paginated result set.
Number of results to return per page.
Was this page helpful?
⌘I
List tickets
curl --request GET \
--url https://api.initdesk.com/organizations/{organization_id}/tickets/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/{organization_id}/tickets/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/{organization_id}/tickets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.initdesk.com/organizations/{organization_id}/tickets/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-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"
"net/http"
"io"
)
func main() {
url := "https://api.initdesk.com/organizations/{organization_id}/tickets/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.initdesk.com/organizations/{organization_id}/tickets/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/{organization_id}/tickets/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"inbox": {
"id": 123,
"name": "<string>",
"email_prefix": "<string>",
"customer_interaction_style": "helpdesk"
},
"channel": {
"type": "<string>",
"connection_id": 123
},
"public_id": "<string>",
"customer": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"is_spam": true
},
"assignee": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"subject": "<string>",
"short_description": "<string>",
"sentiment_analysis_class": "positive",
"status": "created",
"waiting_on": "",
"classification": "",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"customer_visible_reply_count": 123,
"summary": "<string>",
"origin": "email",
"has_attachments": true,
"from_email": "jsmith@example.com",
"from_name": "<string>",
"snoozed_until": "2023-11-07T05:31:56Z",
"snoozed_by": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"last_snooze_ended_at": "2023-11-07T05:31:56Z",
"last_unsnooze_reason": "timer",
"merged_into": {
"id": 123,
"public_id": "<string>",
"subject": "<string>"
},
"merged_at": "2023-11-07T05:31:56Z",
"tags": [
{
"id": 123,
"name": "<string>",
"color": "<string>"
}
],
"language": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}