curl --request POST \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/tickets \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"email": "john@example.com",
"subject": "How to resolve the pending payments",
"description": "I need your help in resolving the pending payments.",
"ticket_fields": {
"Country": "USA"
},
"name": "John Luther",
"channel": "email",
"to": "[\"eve@example.com\",\"kevin@example.com\"]",
"cc": "[\"eve@example.com\",\"kevin@example.com\"]",
"group": "sales",
"assignee_email": "oliver@example.com",
"status": "open",
"priority": "low",
"category": "Questions",
"sub_category_one": "Billing",
"sub_category_two": "Refund",
"tags": [
"refund",
"urgent"
],
"resolution_due_date": "2025-12-31T23:59:59Z"
}
'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/tickets"
payload = {
"email": "john@example.com",
"subject": "How to resolve the pending payments",
"description": "I need your help in resolving the pending payments.",
"ticket_fields": { "Country": "USA" },
"name": "John Luther",
"channel": "email",
"to": "[\"eve@example.com\",\"kevin@example.com\"]",
"cc": "[\"eve@example.com\",\"kevin@example.com\"]",
"group": "sales",
"assignee_email": "oliver@example.com",
"status": "open",
"priority": "low",
"category": "Questions",
"sub_category_one": "Billing",
"sub_category_two": "Refund",
"tags": ["refund", "urgent"],
"resolution_due_date": "2025-12-31T23:59:59Z"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john@example.com',
subject: 'How to resolve the pending payments',
description: 'I need your help in resolving the pending payments.',
ticket_fields: {Country: 'USA'},
name: 'John Luther',
channel: 'email',
to: '["eve@example.com","kevin@example.com"]',
cc: '["eve@example.com","kevin@example.com"]',
group: 'sales',
assignee_email: 'oliver@example.com',
status: 'open',
priority: 'low',
category: 'Questions',
sub_category_one: 'Billing',
sub_category_two: 'Refund',
tags: ['refund', 'urgent'],
resolution_due_date: '2025-12-31T23:59:59Z'
})
};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/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://{your-subdomain}.neetodesk.com/api/external/v2/tickets",
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([
'email' => 'john@example.com',
'subject' => 'How to resolve the pending payments',
'description' => 'I need your help in resolving the pending payments.',
'ticket_fields' => [
'Country' => 'USA'
],
'name' => 'John Luther',
'channel' => 'email',
'to' => '["eve@example.com","kevin@example.com"]',
'cc' => '["eve@example.com","kevin@example.com"]',
'group' => 'sales',
'assignee_email' => 'oliver@example.com',
'status' => 'open',
'priority' => 'low',
'category' => 'Questions',
'sub_category_one' => 'Billing',
'sub_category_two' => 'Refund',
'tags' => [
'refund',
'urgent'
],
'resolution_due_date' => '2025-12-31T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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://{your-subdomain}.neetodesk.com/api/external/v2/tickets"
payload := strings.NewReader("{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-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://{your-subdomain}.neetodesk.com/api/external/v2/tickets")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body{
"ticket": {
"id": "aaaabbbb-cccc-dddd-eeee-ffff00003333",
"number": 42,
"url": "https://example.neetodesk.com/admin/tickets/42"
}
}Create ticket
Creates a new ticket.
curl --request POST \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/tickets \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"email": "john@example.com",
"subject": "How to resolve the pending payments",
"description": "I need your help in resolving the pending payments.",
"ticket_fields": {
"Country": "USA"
},
"name": "John Luther",
"channel": "email",
"to": "[\"eve@example.com\",\"kevin@example.com\"]",
"cc": "[\"eve@example.com\",\"kevin@example.com\"]",
"group": "sales",
"assignee_email": "oliver@example.com",
"status": "open",
"priority": "low",
"category": "Questions",
"sub_category_one": "Billing",
"sub_category_two": "Refund",
"tags": [
"refund",
"urgent"
],
"resolution_due_date": "2025-12-31T23:59:59Z"
}
'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/tickets"
payload = {
"email": "john@example.com",
"subject": "How to resolve the pending payments",
"description": "I need your help in resolving the pending payments.",
"ticket_fields": { "Country": "USA" },
"name": "John Luther",
"channel": "email",
"to": "[\"eve@example.com\",\"kevin@example.com\"]",
"cc": "[\"eve@example.com\",\"kevin@example.com\"]",
"group": "sales",
"assignee_email": "oliver@example.com",
"status": "open",
"priority": "low",
"category": "Questions",
"sub_category_one": "Billing",
"sub_category_two": "Refund",
"tags": ["refund", "urgent"],
"resolution_due_date": "2025-12-31T23:59:59Z"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john@example.com',
subject: 'How to resolve the pending payments',
description: 'I need your help in resolving the pending payments.',
ticket_fields: {Country: 'USA'},
name: 'John Luther',
channel: 'email',
to: '["eve@example.com","kevin@example.com"]',
cc: '["eve@example.com","kevin@example.com"]',
group: 'sales',
assignee_email: 'oliver@example.com',
status: 'open',
priority: 'low',
category: 'Questions',
sub_category_one: 'Billing',
sub_category_two: 'Refund',
tags: ['refund', 'urgent'],
resolution_due_date: '2025-12-31T23:59:59Z'
})
};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/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://{your-subdomain}.neetodesk.com/api/external/v2/tickets",
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([
'email' => 'john@example.com',
'subject' => 'How to resolve the pending payments',
'description' => 'I need your help in resolving the pending payments.',
'ticket_fields' => [
'Country' => 'USA'
],
'name' => 'John Luther',
'channel' => 'email',
'to' => '["eve@example.com","kevin@example.com"]',
'cc' => '["eve@example.com","kevin@example.com"]',
'group' => 'sales',
'assignee_email' => 'oliver@example.com',
'status' => 'open',
'priority' => 'low',
'category' => 'Questions',
'sub_category_one' => 'Billing',
'sub_category_two' => 'Refund',
'tags' => [
'refund',
'urgent'
],
'resolution_due_date' => '2025-12-31T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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://{your-subdomain}.neetodesk.com/api/external/v2/tickets"
payload := strings.NewReader("{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-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://{your-subdomain}.neetodesk.com/api/external/v2/tickets")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/tickets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john@example.com\",\n \"subject\": \"How to resolve the pending payments\",\n \"description\": \"I need your help in resolving the pending payments.\",\n \"ticket_fields\": {\n \"Country\": \"USA\"\n },\n \"name\": \"John Luther\",\n \"channel\": \"email\",\n \"to\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"cc\": \"[\\\"eve@example.com\\\",\\\"kevin@example.com\\\"]\",\n \"group\": \"sales\",\n \"assignee_email\": \"oliver@example.com\",\n \"status\": \"open\",\n \"priority\": \"low\",\n \"category\": \"Questions\",\n \"sub_category_one\": \"Billing\",\n \"sub_category_two\": \"Refund\",\n \"tags\": [\n \"refund\",\n \"urgent\"\n ],\n \"resolution_due_date\": \"2025-12-31T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body{
"ticket": {
"id": "aaaabbbb-cccc-dddd-eeee-ffff00003333",
"number": 42,
"url": "https://example.neetodesk.com/admin/tickets/42"
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Body
Email address of the customer.
"john@example.com"
Subject for the ticket.
"How to resolve the pending payments"
Description for the ticket.
"I need your help in resolving the pending payments."
Custom ticket fields. Refer to the ticket fields article for more details.
{ "Country": "USA" }Name of the customer.
"John Luther"
Source of the ticket. Defaults to api if not specified or if an invalid channel is provided.
email, ui, twitter, chat, form, api, whatsapp, telephony "email"
Array of additional emails to be added to the to field of any responses from the ticket.
"[\"eve@example.com\",\"kevin@example.com\"]"
Array of emails to be added to the cc field of any responses from the ticket.
"[\"eve@example.com\",\"kevin@example.com\"]"
Email address belonging to a team member.
"oliver@example.com"
Status for the ticket. Default statuses include new, open, on_hold, waiting_on_customer, closed, spam, trash. Custom statuses are also supported.
"open"
Priority for the ticket.
low, medium, high, urgent "low"
Category for the ticket. Default categories include None, Questions, Incident, Problem, Feature request, Refund. Custom categories are also supported.
"Questions"
Sub-category for the ticket.
"Billing"
Second-level sub-category for the ticket.
"Refund"
Tags to assign to the ticket.
["refund", "urgent"]Resolution due date for the ticket.
"2025-12-31T23:59:59Z"