List an end user's tickets (Teams Tickets tab)
curl --request GET \
--url https://api.neoagent.io/public-api/end-user/ticketsimport requests
url = "https://api.neoagent.io/public-api/end-user/tickets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.neoagent.io/public-api/end-user/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.neoagent.io/public-api/end-user/tickets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.neoagent.io/public-api/end-user/tickets"
req, _ := http.NewRequest("GET", url, nil)
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.neoagent.io/public-api/end-user/tickets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/end-user/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"closed_window_days": 123,
"open": [
{
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"status": "<string>",
"ticket_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
],
"recently_closed": [
{
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"status": "<string>",
"ticket_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
],
"state": "OK"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}End users
List an end user's tickets (Teams Tickets tab)
Serves the “Tickets” tab of a white-label Teams app: the signed-in end user’s open tickets, and those closed in the last closed_window_days days, read live from the PSA. Not called with a Neo API key: the Authorization: Bearer token is the Teams tab SSO token that Microsoft Teams issues to the tab, and it identifies the user and their Microsoft 365 tenant. Returns 401 for an invalid token, 404 channel_not_found when the channel’s app is not installed in that tenant or has the tab switched off, 409 end_company_not_mapped when the tenant is not linked to one of the MSP’s companies, and 429 past 30 requests a minute per user. state is NO_CONTACT when no PSA contact at the user’s company has their email address.
GET
/
public-api
/
end-user
/
tickets
List an end user's tickets (Teams Tickets tab)
curl --request GET \
--url https://api.neoagent.io/public-api/end-user/ticketsimport requests
url = "https://api.neoagent.io/public-api/end-user/tickets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.neoagent.io/public-api/end-user/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.neoagent.io/public-api/end-user/tickets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.neoagent.io/public-api/end-user/tickets"
req, _ := http.NewRequest("GET", url, nil)
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.neoagent.io/public-api/end-user/tickets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/end-user/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"closed_window_days": 123,
"open": [
{
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"status": "<string>",
"ticket_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
],
"recently_closed": [
{
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"status": "<string>",
"ticket_id": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
],
"state": "OK"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}