/api/v1/tickets
const url = 'https://api.endless.zaia.app/api/v1/tickets';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"chatId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","ticketingTeamId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","assigneeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","status":"pending"}'};
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.endless.zaia.app/api/v1/tickets \ --header 'Content-Type: application/json' \ --data '{ "chatId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ticketingTeamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "assigneeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "pending" }'Creates a new ticket.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
A UUID v4 string that identifies an entity.
The id of the ticketing team responsible for the ticket.
A UUID v4 string that identifies an entity.
Responses
Seção intitulada “Responses”The ticket was created.
object
A UUID v4 string that identifies an entity.
The id of the user assigned to the ticket.
A UUID v4 string that identifies an entity.
The type of ticket creation: takeover (human intervention) or handover (agent automatic creation).
The last time the ticket was viewed by the assignee.
A brief summary of the chat up until the ticket was created.
The id of the ticketing team responsible for the ticket.
Example
{ "circumstance": "takeover", "status": "pending"}Unauthorized.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Chat not found or assignee not found.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Ticket already exists.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}