Skip to content

Tickets

Create a ticket on behalf of one of your customers — typically in response to a business event (failed payment, stuck order, broken integration).

POST /tickets/api-create
FieldTypeRequiredDescription
customerExternalIdstringCustomer’s externalId
subjectstringTicket subject
descriptionstringDescription (Markdown supported)
priorityLOW | MEDIUM | HIGH | URGENT | CRITICALDefault: MEDIUM
categorystringFree-form category
metadataobjectFree-form data (orderId, errorCode, etc.)
tagIdsstring[]Tag IDs (UUID) to attach

The channel field is automatically set to API.

curl
curl -X POST https://supportdesk.innovartx.com/api/v1/tickets/api-create \
-H "X-API-Key: $SUPPORTDESK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerExternalId": "user_42",
"subject": "Payment failed for order #12345",
"description": "Payment attempt failed with CARD_DECLINED. Customer has been notified by email.",
"priority": "HIGH",
"metadata": { "orderId": "12345", "amount": 99.9 }
}'
Node.js
await fetch('https://supportdesk.innovartx.com/api/v1/tickets/api-create', {
method: 'POST',
headers: {
'X-API-Key': process.env.SUPPORTDESK_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
customerExternalId: 'user_42',
subject: 'Payment failed for order #12345',
description: 'Payment attempt failed…',
priority: 'HIGH',
metadata: { orderId: '12345', amount: 99.9 },
}),
});
Python (requests)
import os, requests
requests.post(
'https://supportdesk.innovartx.com/api/v1/tickets/api-create',
headers={'X-API-Key': os.environ['SUPPORTDESK_API_KEY']},
json={
'customerExternalId': 'user_42',
'subject': 'Payment failed for order #12345',
'description': 'Payment attempt failed…',
'priority': 'HIGH',
'metadata': {'orderId': '12345', 'amount': 99.9},
},
)
PHP (curl)
$ch = curl_init('https://supportdesk.innovartx.com/api/v1/tickets/api-create');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'customerExternalId' => 'user_42',
'subject' => 'Payment failed for order #12345',
'description' => 'Payment attempt failed…',
'priority' => 'HIGH',
'metadata' => ['orderId' => '12345', 'amount' => 99.9],
]),
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('SUPPORTDESK_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
curl_close($ch);
{
"success": true,
"data": {
"id": "clyyyyy",
"ticketNumber": "INV-1042",
"subject": "Payment failed for order #12345",
"status": "IN_PROGRESS",
"priority": "HIGH",
"channel": "API",
"customer": { "id": "clxxxxxx", "externalId": "user_42", "email": "john@acme.com" },
"assignedAgent": { "id": "…", "name": "Agent N1", "email": "agent@acme.com" },
"createdAt": "2026-04-18T10:00:00Z"
},
"timestamp": "2026-04-18T10:00:00Z"
}

If an N1 agent is available, the ticket is auto-assigned and the agent receives an email + real-time dashboard notification.

HTTP codeBusiness codeCause
400VALIDATION_ERRORInvalid or missing fields
403PLAN_LIMIT_REACHEDMonthly ticket quota reached on your plan
404CUSTOMER_NOT_FOUNDexternalId matches no customer in your app

See Errors.