How to Create a Ticket via API

 

You can implement an API to create a ticket by setting ticket-specific properties in the Help Desk.

 

Endpoint URL:

 

The endpoint URL given below is used to call the rest API. POST will be used as the request method. JSON will be your request format.

 

POST https://www.proprofsdesk.com/app/api/v1/create/ticket/
Note: Endpoint URL is case-sensitive and with forward-slash ( / ) at the end.

 

Sample Code | JSON

 

Accept: application/json
Content-Type: application/json
{
         "account_email" : "john@proprofs.com",
          "token" : "*****7edf67d0a*****aca630b0*****",
          "name" : "John Smith",
          "email" : "john@acme.com",
          "phone" : "0000000000",
          "subject" : "Query About GPS Tracking Device",
          "description" : "I am writing to inquire about the availability of the product 101 GPS Tracking Device.,
           "staff" : "ST007-007",
           "priority" : "normal",
           "inbox" : "IB238-436",
            "custom_fields" :
            [
            {
                    "id" : "CF007-07",
                    "value" : "Micro"
            },
           {
                   "id" : "CF007-08",
                   "value" : "10KM"
           }
          ]

}

 

Request Parameters

 

Parameter Required Type Description
token Yes String Your ProProfs account email that you have used to register the Help Desk account.
email Yes String Email address of the requester.
name No String Name of the requester.
phone No String Phone number of the requester.
subject Yes String ID of the staff to whom the ticket has been assigned. The ID is associated with every staff on the list.
priority No String Custom fields for the ticket. It's an array of objects consisting of id and value properties.

 

 Response Format

JSON

 

Example Response [Success]

 

Accept: application/json
Content-Type: application/json
{
     "status" : "success",
     "ticket_id" : "00700"
}

 

Response Field Description
status Success when the ticket created successfully.
ticket_id The ID of the newly created ticket.

 

Example Response [Failed]

 

Accept : application/json
Content-Type : application/json
{
       "status" : "error",
       "description" : "Unable to authenticate request using account email and token"
}

 

Response Field Description
status Error when the operation was failed.
description The error text to describe the error.

 

 

 

 

Was this information helpful?
© 2005 - 2024 ProProfs
-
add chat to your website