Ticket Management
Create Ticket
Create a new support ticket
POST
/
api
/
ext-v1
/
ticket
/
createTicket
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device not connecting to WiFi",
"description": "Customer reports their device fails to connect after firmware update v2.3.1",
"priority": "high",
"customerEmail": "john.doe@example.com",
"category": "Connectivity"
}'
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Battery draining too fast",
"customerId": "cust_a1b2c3d4e5f6",
"priority": "medium"
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device not connecting to WiFi',
description: 'Customer reports their device fails to connect after firmware update v2.3.1',
priority: 'high',
customerEmail: 'john.doe@example.com',
category: 'Connectivity'
})
});
const data = await response.json();
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Battery draining too fast',
customerId: 'cust_a1b2c3d4e5f6',
priority: 'medium'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device not connecting to WiFi',
'description': 'Customer reports their device fails to connect after firmware update v2.3.1',
'priority': 'high',
'customerEmail': 'john.doe@example.com',
'category': 'Connectivity'
}
)
data = response.json()
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Battery draining too fast',
'customerId': 'cust_a1b2c3d4e5f6',
'priority': 'medium'
}
)
data = response.json()
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device overheating during charging",
"customerEmail": "john.doe@example.com",
"priority": "high",
"messages": [
{ "role": "customer", "content": "My device gets very hot when I plug it in to charge." },
{ "role": "bot", "content": "I'\''m sorry to hear that. How long has this been happening?" },
{ "role": "customer", "content": "Started about a week ago after the latest update." }
]
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device overheating during charging',
customerEmail: 'john.doe@example.com',
priority: 'high',
messages: [
{ role: 'customer', content: 'My device gets very hot when I plug it in to charge.' },
{ role: 'bot', content: "I'm sorry to hear that. How long has this been happening?" },
{ role: 'customer', content: 'Started about a week ago after the latest update.' }
]
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device overheating during charging',
'customerEmail': 'john.doe@example.com',
'priority': 'high',
'messages': [
{'role': 'customer', 'content': 'My device gets very hot when I plug it in to charge.'},
{'role': 'bot', 'content': "I'm sorry to hear that. How long has this been happening?"},
{'role': 'customer', 'content': 'Started about a week ago after the latest update.'}
]
}
)
data = response.json()
{
"success": true,
"ticketId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Ticket created successfully"
}
{
"error": "title is required"
}
{
"error": "Either customerEmail or customerId is required"
}
{
"error": "Customer not found"
}
{
"error": "priority must be one of: low, medium, high, urgent"
}
Overview
Creates a new support ticket in Telemetron. Behavior:- Requires either
customerEmailorcustomerIdto associate the ticket with a customer - If
customerEmailis provided and no matching customer exists, a new customer is created automatically - Tickets are automatically categorized and routed based on your organization’s rules
Authentication
Your organization’s API key
Request Body
Ticket title (max 255 characters)
Detailed description of the issue or request
Ticket priority. One of:
low, medium, high, urgentCustomer’s email address. If the customer doesn’t exist, one will be created automatically. Either
customerEmail or customerId is required.Existing Telemetron customer ID. Use this if you already have the customer’s ID from a previous API call. Either
customerEmail or customerId is required.Category name for ticket routing. Must match an existing category in your organization. If not provided or not matched, the ticket will be categorized automatically by AI.
Conversation history to include with the ticket. Each message has a
role (customer, agent, or bot) and content string. If no description is provided, messages are used to generate the ticket description automatically. The first customer message is also included in Slack notifications.Response
Indicates if the operation was successful
The unique identifier for the created ticket
Description of the operation result
Examples
Create Ticket with Customer Email
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device not connecting to WiFi",
"description": "Customer reports their device fails to connect after firmware update v2.3.1",
"priority": "high",
"customerEmail": "john.doe@example.com",
"category": "Connectivity"
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device not connecting to WiFi',
description: 'Customer reports their device fails to connect after firmware update v2.3.1',
priority: 'high',
customerEmail: 'john.doe@example.com',
category: 'Connectivity'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device not connecting to WiFi',
'description': 'Customer reports their device fails to connect after firmware update v2.3.1',
'priority': 'high',
'customerEmail': 'john.doe@example.com',
'category': 'Connectivity'
}
)
data = response.json()
Create Ticket with Customer ID
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Battery draining too fast",
"customerId": "cust_a1b2c3d4e5f6",
"priority": "medium"
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Battery draining too fast',
customerId: 'cust_a1b2c3d4e5f6',
priority: 'medium'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Battery draining too fast',
'customerId': 'cust_a1b2c3d4e5f6',
'priority': 'medium'
}
)
data = response.json()
Create Ticket with Messages
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device overheating during charging",
"customerEmail": "john.doe@example.com",
"priority": "high",
"messages": [
{ "role": "customer", "content": "My device gets very hot when I plug it in to charge." },
{ "role": "bot", "content": "I'\''m sorry to hear that. How long has this been happening?" },
{ "role": "customer", "content": "Started about a week ago after the latest update." }
]
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device overheating during charging',
customerEmail: 'john.doe@example.com',
priority: 'high',
messages: [
{ role: 'customer', content: 'My device gets very hot when I plug it in to charge.' },
{ role: 'bot', content: "I'm sorry to hear that. How long has this been happening?" },
{ role: 'customer', content: 'Started about a week ago after the latest update.' }
]
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device overheating during charging',
'customerEmail': 'john.doe@example.com',
'priority': 'high',
'messages': [
{'role': 'customer', 'content': 'My device gets very hot when I plug it in to charge.'},
{'role': 'bot', 'content': "I'm sorry to hear that. How long has this been happening?"},
{'role': 'customer', 'content': 'Started about a week ago after the latest update.'}
]
}
)
data = response.json()
Response
{
"success": true,
"ticketId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Ticket created successfully"
}
{
"error": "title is required"
}
{
"error": "Either customerEmail or customerId is required"
}
{
"error": "Customer not found"
}
{
"error": "priority must be one of: low, medium, high, urgent"
}
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device not connecting to WiFi",
"description": "Customer reports their device fails to connect after firmware update v2.3.1",
"priority": "high",
"customerEmail": "john.doe@example.com",
"category": "Connectivity"
}'
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Battery draining too fast",
"customerId": "cust_a1b2c3d4e5f6",
"priority": "medium"
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device not connecting to WiFi',
description: 'Customer reports their device fails to connect after firmware update v2.3.1',
priority: 'high',
customerEmail: 'john.doe@example.com',
category: 'Connectivity'
})
});
const data = await response.json();
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Battery draining too fast',
customerId: 'cust_a1b2c3d4e5f6',
priority: 'medium'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device not connecting to WiFi',
'description': 'Customer reports their device fails to connect after firmware update v2.3.1',
'priority': 'high',
'customerEmail': 'john.doe@example.com',
'category': 'Connectivity'
}
)
data = response.json()
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Battery draining too fast',
'customerId': 'cust_a1b2c3d4e5f6',
'priority': 'medium'
}
)
data = response.json()
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device overheating during charging",
"customerEmail": "john.doe@example.com",
"priority": "high",
"messages": [
{ "role": "customer", "content": "My device gets very hot when I plug it in to charge." },
{ "role": "bot", "content": "I'\''m sorry to hear that. How long has this been happening?" },
{ "role": "customer", "content": "Started about a week ago after the latest update." }
]
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device overheating during charging',
customerEmail: 'john.doe@example.com',
priority: 'high',
messages: [
{ role: 'customer', content: 'My device gets very hot when I plug it in to charge.' },
{ role: 'bot', content: "I'm sorry to hear that. How long has this been happening?" },
{ role: 'customer', content: 'Started about a week ago after the latest update.' }
]
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device overheating during charging',
'customerEmail': 'john.doe@example.com',
'priority': 'high',
'messages': [
{'role': 'customer', 'content': 'My device gets very hot when I plug it in to charge.'},
{'role': 'bot', 'content': "I'm sorry to hear that. How long has this been happening?"},
{'role': 'customer', 'content': 'Started about a week ago after the latest update.'}
]
}
)
data = response.json()
{
"success": true,
"ticketId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Ticket created successfully"
}
{
"error": "title is required"
}
{
"error": "Either customerEmail or customerId is required"
}
{
"error": "Customer not found"
}
{
"error": "priority must be one of: low, medium, high, urgent"
}
Status Codes
| Code | Description |
|---|---|
| 200 | Ticket created successfully |
| 400 | Invalid request (missing required fields, invalid JSON payload, or invalid priority) |
| 401 | Invalid or missing API key |
| 404 | Customer not found (when using customerId) |
| 500 | Internal server error |
⌘I
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device not connecting to WiFi",
"description": "Customer reports their device fails to connect after firmware update v2.3.1",
"priority": "high",
"customerEmail": "john.doe@example.com",
"category": "Connectivity"
}'
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Battery draining too fast",
"customerId": "cust_a1b2c3d4e5f6",
"priority": "medium"
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device not connecting to WiFi',
description: 'Customer reports their device fails to connect after firmware update v2.3.1',
priority: 'high',
customerEmail: 'john.doe@example.com',
category: 'Connectivity'
})
});
const data = await response.json();
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Battery draining too fast',
customerId: 'cust_a1b2c3d4e5f6',
priority: 'medium'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device not connecting to WiFi',
'description': 'Customer reports their device fails to connect after firmware update v2.3.1',
'priority': 'high',
'customerEmail': 'john.doe@example.com',
'category': 'Connectivity'
}
)
data = response.json()
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Battery draining too fast',
'customerId': 'cust_a1b2c3d4e5f6',
'priority': 'medium'
}
)
data = response.json()
curl -X POST https://admin.telemetron.ai/api/ext-v1/ticket/createTicket \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Device overheating during charging",
"customerEmail": "john.doe@example.com",
"priority": "high",
"messages": [
{ "role": "customer", "content": "My device gets very hot when I plug it in to charge." },
{ "role": "bot", "content": "I'\''m sorry to hear that. How long has this been happening?" },
{ "role": "customer", "content": "Started about a week ago after the latest update." }
]
}'
const response = await fetch('https://admin.telemetron.ai/api/ext-v1/ticket/createTicket', {
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Device overheating during charging',
customerEmail: 'john.doe@example.com',
priority: 'high',
messages: [
{ role: 'customer', content: 'My device gets very hot when I plug it in to charge.' },
{ role: 'bot', content: "I'm sorry to hear that. How long has this been happening?" },
{ role: 'customer', content: 'Started about a week ago after the latest update.' }
]
})
});
const data = await response.json();
import requests
response = requests.post(
'https://admin.telemetron.ai/api/ext-v1/ticket/createTicket',
headers={
'x-api-key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'title': 'Device overheating during charging',
'customerEmail': 'john.doe@example.com',
'priority': 'high',
'messages': [
{'role': 'customer', 'content': 'My device gets very hot when I plug it in to charge.'},
{'role': 'bot', 'content': "I'm sorry to hear that. How long has this been happening?"},
{'role': 'customer', 'content': 'Started about a week ago after the latest update.'}
]
}
)
data = response.json()
{
"success": true,
"ticketId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Ticket created successfully"
}
{
"error": "title is required"
}
{
"error": "Either customerEmail or customerId is required"
}
{
"error": "Customer not found"
}
{
"error": "priority must be one of: low, medium, high, urgent"
}