Create Ticket
POST
/public/v1/tickets
const url = 'https://api.nuntius.chat/public/v1/tickets';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"customerId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","leadId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","conversationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","subject":"example","assignedTo":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","comment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.nuntius.chat/public/v1/tickets \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "customerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "leadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "conversationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "subject": "example", "assignedTo": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "comment": "example" }'Create a ticket against one of the tenant’s own customers/leads/conversations (SPEC_API_PUBLICA.md §2.5).
At least one of customerId/leadId/conversationId is required -> 422 otherwise.
Each id GIVEN, foreign or unknown, -> 404, zero persistence. assignedTo, when given,
must resolve to an assignable tenant user -> 404 otherwise, zero persistence.
Idempotency-Key (API-3, D-API-4) is optional: a repeat with the SAME header and SAME body
replays the original response without creating a second ticket; the SAME header with a
DIFFERENT body -> 422 IDEMPOTENCY_KEY_REUSE_MISMATCH.
Permiso necesario: tenant:tickets.manage
