Create Ticket
Creates a new support ticket.
Authentication: X-API-KEY header (see Authentication).
Request body
| Field | Type | Description |
|---|---|---|
| userEmail | string | Email of the requesting user. |
| ticketType | string | Ticket type. |
| subject | string | Ticket subject. |
| comment | string | Initial comment / body. |
| dueDate | date | Optional due date. |
| formData | object | Structured 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
}
]
}