跳转到主要内容
POST
Creates a ticket for the authenticated service provider.

授权

X-API-Key
string
header
必填

Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.

请求体

Ticket details.

Request body for creating a ticket. The owning service provider is resolved from the request context, not from the body.

Title
string
必填

Ticket title/subject. Required. Maximum 250 characters.

Minimum string length: 1
示例:

"Printer on 3rd floor is offline"

StatusId
integer<int64>
必填

Initial status identifier. Required; must be an existing status for the service provider.

示例:

1

GroupId
integer<int64>
必填

Identifier of the technician group the ticket is assigned to. Required.

示例:

101

TypeId
integer<int64>
必填

Ticket type identifier. Required.

示例:

1

CreatedByName
string | null

Display name to record as the ticket creator when no contact is resolved. Omitted or blank, it is recorded as API.

CreatedOn
string<date-time> | null

Backdate the ticket's creation timestamp — for importing tickets from another system. Must not be in the future. Omit to use the current time. Required when ClosedOn or UpdatedOn is supplied. A caller migrating a ticket sends CreatedOn, ClosedOn and UpdatedOn together, so the ticket keeps the dates it had in the other system. Send only when importing history. A record with this field set sends no emails or notifications.

ClosedOn
string<date-time> | null

The date the ticket was closed, for importing already-closed tickets from another system. Requires CreatedOn to be supplied. Only valid when the ticket is created in a closed status. Must not be in the future or earlier than CreatedOn. Omit to have a ticket created in a closed status closed as of its creation time. Send only when importing history. A record with this field set sends no emails or notifications.

UpdatedOn
string<date-time> | null

Backdate the ticket's last-activity timestamp so an imported ticket does not sort above live work. Requires CreatedOn to be supplied. Must not be in the future or earlier than CreatedOn. Defaults to ClosedOn when supplied, otherwise to CreatedOn.

ClientId
integer<int64> | null

Identifier of the client the ticket belongs to.

LocationId
integer<int64> | null

Identifier of the client location the ticket belongs to. Requires ClientId.

ContactId
integer<int64> | null

Identifier of the primary contact for the ticket. With a ClientId it may be a contact of any client; without one it must be a temporary contact (IsTemporaryContact true).

CcContactIds
integer<int64>[] | null

Identifiers of additional (CC) contacts. At most 100. Same rule as ContactId: contacts of any client, or temporary contacts when the ticket has no client.

Description
string | null

Ticket description / body, as HTML. Text without markup is wrapped in a paragraph. A literal < or > in the text must be sent as &lt; / &gt;.

PriorityId
enum<integer>
可用选项:
0,
1,
2,
3,
4
SourceId
enum<integer>
可用选项:
1,
2,
3,
4,
5,
6
LeadAssigneeId
integer<int64> | null

Identifier of the lead assignee (technician).

AssistingAssigneeIds
integer<int64>[] | null

Identifiers of assisting assignees (technicians).

WatcherIds
integer<int64>[] | null

Identifiers of technicians watching the ticket.

TagIds
integer<int64>[] | null

Identifiers of tags to apply to the ticket.

AgentAssetIds
string<uuid>[] | null

Identifiers of agent (managed device) assets to link to the ticket.

CustomAssetIds
string<uuid>[] | null

Identifiers of custom assets to link to the ticket.

UptimeIds
string<uuid>[] | null

Identifiers of uptime monitors to link to the ticket.

SendTicketCreatedEmail
boolean | null

When true, sends a "ticket created" email to the contact. Defaults to false. Ignored when CreatedOn or ClosedOn is supplied.

IsUnread
boolean | null

Whether the ticket is created in an unread state. Defaults to true. Ignored when CreatedOn or ClosedOn is supplied: the ticket is created read.

响应

OK

StatusCode
enum<integer>
可用选项:
100,
101,
102,
103,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
421,
422,
423,
424,
426,
428,
429,
431,
451,
500,
501,
502,
503,
504,
505,
506,
507,
508,
510,
511
IsSuccess
boolean
Data
object

Result of a create-ticket request.

DataContext
object | null
示例:

null

Notifications
object[]