Skip to main content
POST
/
tickets
Create a ticket
curl --request POST \
  --url https://{your-subdomain}.neetodesk.com/api/v1/public/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/v1/public/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/v1/public/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/v1/public/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/v1/public/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/v1/public/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/v1/public/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
{
  "notice_code": "<string>",
  "ticket": {
    "id": "aaaabbbb-cccc-dddd-eeee-ffff00003333",
    "number": 42,
    "url": "https://example.neetodesk.com/admin/tickets/42"
  }
}
Deprecated: This is a v1 endpoint. It will continue to work, but we recommend migrating to the v2 equivalent for improved REST compliance (correct HTTP status codes, consistent response envelopes, and hyphenated URLs).
Replace {your-subdomain} with your workspace’s subdomain.
Learn how to find your subdomain in Workspace subdomain.

Headers

X-Api-Key
string
default:your-api-key
required

Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.

Body

application/json
email
string
required

Email address of the customer.

Example:

"john@example.com"

subject
string
required

Subject for the ticket.

Example:

"How to resolve the pending payments"

description
string
required

Description for the ticket.

Example:

"I need your help in resolving the pending payments."

ticket_fields
object

Custom ticket fields. Refer to the ticket fields article for more details.

Example:
{ "Country": "USA" }
name
string

Name of the customer.

Example:

"John Luther"

channel
enum<string>

Source of the ticket. Defaults to api if not specified or if an invalid channel is provided.

Available options:
email,
ui,
twitter,
chat,
form,
api,
whatsapp,
telephony
Example:

"email"

to
string

Array of additional emails to be added to the to field of any responses from the ticket.

Example:

"[\"eve@example.com\",\"kevin@example.com\"]"

cc
string

Array of emails to be added to the cc field of any responses from the ticket.

Example:

"[\"eve@example.com\",\"kevin@example.com\"]"

group
string

Name of an existing group.

Example:

"sales"

assignee_email
string<email>

Email address belonging to a team member.

Example:

"oliver@example.com"

status
string

Status for the ticket. Default statuses include new, open, on_hold, waiting_on_customer, closed, spam, trash. Custom statuses are also supported.

Example:

"open"

priority
enum<string>

Priority for the ticket.

Available options:
low,
medium,
high,
urgent
Example:

"low"

category
string

Category for the ticket. Default categories include None, Questions, Incident, Problem, Feature request, Refund. Custom categories are also supported.

Example:

"Questions"

sub_category_one
string

Sub-category for the ticket.

Example:

"Billing"

sub_category_two
string

Second-level sub-category for the ticket.

Example:

"Refund"

tags
string[]

Tags to assign to the ticket.

Example:
["refund", "urgent"]
resolution_due_date
string<date-time>

Resolution due date for the ticket.

Example:

"2025-12-31T23:59:59Z"

Response

200 - application/json

OK - Request succeeded

notice_code
string
ticket
object