Skip to content

Ticket Related APIs

Komal Sharma edited this page Aug 30, 2022 · 17 revisions

## For creating a new ticket:

API URL: {helpdesk_url}/api/v1/ticket

Method: [POST]

Authorization: Basic {API token}

Inputs:

message : (your message)

actAsType : (agent/customer)

actAsEmail: (if actAsType is agent then specify actAsEmail as agent Email if actAsType is the customer then don't need for this parameter)

name: (customer name)

subject: (Ticket subject)

from: (Customer Email)

Optional Inputs:

attachments

## For Adding a Reply or thread:

API URL: {helpdesk_url}/api/v1/ticket/{ticketid}/thread

Method: [POST]

Authorization: Basic {API token}

Inputs:

message: (your reply)

actAsType: (agent/customer)

actAsEmail: (email Id)

threadType: (reply/forward/note)

to: (forward email Id ) [This is used only for the forward option]

Optional Inputs:

attachments

## Fetching all Tickets:

API URL: {helpdesk_url}/api/v1/tickets

Method: [GET]

Authorization: Basic {API token}

Optional Inputs:

actAsType: (agent/customer)

actAsEmail: (email Id)

limit: (limit-no) [This is used to limit tickets shown on the postman and used limit in the params option]

Ex for limit set:

API URL: {helpdesk_url}/api/v1/tickets?limit=limit_no


## Assigning ticket to an agent:

API URL: {helpdesk_url}/api/v1/ticket/{ticketId}/agent

Method: [PUT]

Authorization: Basic {API token}

Inputs:

id : (your agent id)

## Adding and removing collaborator:

API URL: {helpdesk_url}/api/v1/ticket/{ticketId}/collaborator

Method: [POST] (For Adding and removing the collaborators Use the method POST).

Authorization: Basic {API token}

Inputs:

email: Collaborator email when adding a Collaborator.

id: Collaborator Id In case of delete Collaborator action.


## Moving a ticket into the trash:

API URL: {helpdesk_url}/api/v1/trash/ticket/{ticketId}

Method: [PUT]

Authorization: Basic {API token}


## Deleting a ticket permanently or forever (Delete the ticket From the trash):

API URL: {helpdesk_url}/api/v1/delete/ticket/{ticketId}

Method: [Delete]

Authorization: Basic {API token}


## Loading a ticket or view ticket:

API URL: {helpdesk_url}/api/v1/ticket/{ticketId}

Method: [GET]

Authorization: Basic {API token}


## Fetching All ticket types:

API URL: {helpdesk_url}/api/v1/ticket-types

Method: [GET]

Authorization: Basic {API token}


## Download ticket attachment:

API URL: {helpdesk_url}/api/v1/ticket/attachment/{attachmentId}

Method: [POST]

Authorization: Basic {API token}


## Download ticket zip attachment:

API URL: {helpdesk_url}/api/v1/ticket/download-zip/{threadId}

Method: [POST]

Authorization: Basic {API token}


## Edit ticket properties:

API URL: {helpdesk_url}/api/v1/ticket/{ticketId}

Method: [PATCH]

Authorization: Basic {API token}

Inputs for agent Update:

property: agent(property is agent)

value: agent Id(agent id)

Inputs for status Update:

property: status(property is status)

value: status Id

Inputs for priority Update:

property: priority(property is priority)

value: priority Id

Inputs for group Update:

property: group(property is group)

value: group Id

Inputs for type Update:

property: type(property is type)

value: type Id

Inputs for label delete:

property: label(property is label)

value: label Id