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"
],
"created_at": "2021-03-04T10:00:00Z",
"updated_at": "2021-06-09T12:00:00Z",
"closed_at": "2021-03-07T10:00:00Z",
"skip_notifications": true,
"external_id": "CP-1234",
"source": "concierge_plus",
"attachments": [
"eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="
]
}
'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'],
created_at: '2021-03-04T10:00:00Z',
updated_at: '2021-06-09T12:00:00Z',
closed_at: '2021-03-07T10:00:00Z',
skip_notifications: true,
external_id: 'CP-1234',
source: 'concierge_plus',
attachments: ['eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ==']
})
};
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));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"],
"created_at": "2021-03-04T10:00:00Z",
"updated_at": "2021-06-09T12:00:00Z",
"closed_at": "2021-03-07T10:00:00Z",
"skip_notifications": True,
"external_id": "CP-1234",
"source": "concierge_plus",
"attachments": ["eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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"
],
"created_at": "2021-03-04T10:00:00Z",
"updated_at": "2021-06-09T12:00:00Z",
"closed_at": "2021-03-07T10:00:00Z",
"skip_notifications": true,
"external_id": "CP-1234",
"source": "concierge_plus",
"attachments": [
"eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="
]
}
'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'],
created_at: '2021-03-04T10:00:00Z',
updated_at: '2021-06-09T12:00:00Z',
closed_at: '2021-03-07T10:00:00Z',
skip_notifications: true,
external_id: 'CP-1234',
source: 'concierge_plus',
attachments: ['eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ==']
})
};
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));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"],
"created_at": "2021-03-04T10:00:00Z",
"updated_at": "2021-06-09T12:00:00Z",
"closed_at": "2021-03-07T10:00:00Z",
"skip_notifications": True,
"external_id": "CP-1234",
"source": "concierge_plus",
"attachments": ["eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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
Custom ticket fields. Refer to the ticket fields article for more details.
{ "Country": "USA" }
Name of an existing group.
"sales"
Status for the ticket. Default statuses are new, open, on_hold,
waiting_on_customer, closed, spam and trash. Custom statuses are also
supported. There is no resolved status, so a source ticket that was resolved
maps to closed, paired with closed_at. trash cannot be set at creation.
"open"
Original creation time, for importing a historical ticket. ISO 8601.
Supplying any of created_at, updated_at or closed_at marks the
request as an import. A value that cannot be parsed is rejected rather
than quietly stored as the time of the request.
"2021-03-04T10:00:00Z"
Original close time, used together with status: closed. ISO 8601. It also
sets the resolution timestamp and the resolution time that agent and team
performance reports average. Omit it on a ticket created closed and the
ticket's own created_at is recorded, giving a zero resolution time rather
than inventing the whole gap up to today.
"2021-03-07T10:00:00Z"
Suppresses everything creating a ticket would otherwise set off: automation
rules and any email they send, webhooks, agent push notifications, Zapier,
Google Sheets, product analytics, the timeline entry, and SLA escalation for
a due date that has already passed. Defaults to true when any of
created_at, updated_at or closed_at is supplied, because backdating
implies an import. Send false to backdate and still notify.
Because webhooks and Zapier are among the things it suppresses, anything downstream that mirrors your tickets will not see the imported ones and has to be reconciled separately.
true
Signed ids returned by Upload attachment or Reserve an attachment upload. The files are attached to the ticket's opening message. A signed id minted in another workspace is rejected, and so is one whose file was reserved but never sent. Attachments are all-or-nothing: if any id in the array is unknown, malformed, unsent or from another workspace, the whole request fails and no ticket is created.
["eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="]