create_ticket
Log a new issue in Request Tracker by creating a ticket with queue, subject, priority, attachments, and custom fields.
Instructions
Create a new ticket in RT
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Cc | No | Cc username(s) (string or array of strings) | |
| Due | No | Due datetime (format: "YYYY-MM-DD HH:MM:SS" in local time) | |
| Told | No | Last Contact datetime (format: "YYYY-MM-DD HH:MM:SS" in local time) | |
| Type | No | Ticket type (e.g. "ticket", "reminder") | |
| Child | No | Child links (ticket ID, URL, or array) | |
| Owner | No | Owner username | |
| Queue | Yes | Queue name or ID | |
| Parent | No | Parent links (ticket ID, URL, or array) | |
| Starts | No | Starts datetime (format: "YYYY-MM-DD HH:MM:SS" in local time) | |
| Status | No | Initial status | |
| AdminCc | No | AdminCc username(s) (string or array of strings) | |
| Content | No | Ticket body content | |
| Started | No | Started datetime (format: "YYYY-MM-DD HH:MM:SS" in local time) | |
| Subject | Yes | Ticket subject | |
| Priority | No | Ticket priority, as a number or as one of the labels this RT displays (e.g. Low, Medium, High). Labels are configured per queue and are case-sensitive, so use the exact label RT shows; when in doubt pass a number. RT does not reject a label it does not recognize, and does not reject a label at all on an installation with priority labels turned off: it sets the priority to 0, the lowest, and reports success. So read the PrioritySet message in the response, which names the label RT actually applied, and tell the user if it is not the one you asked for. A label is applied in a follow-up update because RT cannot resolve one while creating a ticket; if that step fails the response carries PriorityNotSet instead and the ticket is created without the priority. | |
| RefersTo | No | RefersTo links (ticket ID, URL, or array) | |
| DependsOn | No | DependsOn links (ticket ID, URL, or array) | |
| Requestor | No | Requestor username(s) (string or array of strings) | |
| Attachments | No | Files to attach. Provide either FilePath (local file path, server reads and encodes it) or FileContent (pre-encoded MIME Base64). FileName and FileType are optional with FilePath and are inferred from the path. | |
| ContentType | No | Content MIME type (default text/plain) | |
| CustomRoles | No | Custom role assignments as {role_name: username_or_array} | |
| Description | No | Ticket description. This field is HTML: use <p> for paragraphs and <br /> for single line breaks, because a bare newline renders as nothing. Plain text with no markup is sent with its angle brackets escaped for you, and gains paragraphs if it has line breaks. If you send markup, write any angle bracket that is not part of it as < and > yourself — RT silently deletes any tag it does not allow along with the text inside it, so an address left as <bob@example.com> inside HTML is lost. A bare & is safe as typed. | |
| CustomFields | No | Custom field values as {CF_name: value}. How a value is displayed depends on the field: call get_queue_fields and check each field's ContentFormat before writing a multi-line or formatted value. | |
| DependedOnBy | No | DependedOnBy links (ticket ID, URL, or array) | |
| ReferredToBy | No | ReferredToBy links (ticket ID, URL, or array) |