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.
assignedTostring[]Workspace-user emails to assign. Omit or pass null to use workspace defaults; pass [] to create an unassigned ticket.

Get assignee emails from List Users. Emails match case-insensitively. Unknown or non-workspace emails return HTTP 412 before creating the ticket or requester. Zapier integrations use the same request body at /zapier/action/tickets/create.

To change or clear assignees later, use Update 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.", "assignedTo": ["teammate@example.com"]}'

Response​

Returns a TicketWrapper for the created ticket, including its ticket number. The response represents assignedTo as workspace-user IDs.

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