Skip to main content

Create Ticket

POST /public/action/tickets/create

Creates a new support ticket.

Authentication: X-API-KEY header (see Authentication).

Request body

FieldTypeDescription
userEmailstringEmail of the requesting user.
ticketTypestringTicket type.
subjectstringTicket subject.
commentstringInitial comment / body.
dueDatedateOptional due date.
formDataobjectStructured form data attached to the ticket.

Request

curl -X POST https://api.withmoxie.com/public/action/tickets/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"userEmail": "jane@acme.example", "subject": "Cannot log in", "comment": "Portal returns an error."}'

Response

Returns a TicketWrapper for the created ticket, including its ticket number.

{
"ticket": {
"id": "66b0f6e5c3a9e40012ab7100",
"accountId": 10016,
"clientId": "66b0f2a1c3a9e40012ab34cd",
"ticketNumber": 1042,
"subject": "Cannot log in",
"type": "Support",
"status": "Open",
"dueDate": null
},
"comments": [
{
"comment": "Portal returns an error.",
"privateComment": false
}
]
}