Mods for HESK

Mods for HESK Documentation

Welcome to the Mods for HESK REST API Documentation. You'll find comprehensive guides and documentation to help you start working with the Mods for HESK REST API as quickly as possible.

Suggest Edits

General Information

 

Authentication

Most endpoints require authentication in the form of an X-Auth-Token to help cut down on spam. A token can be generated for a user via the API Settings page in the admin area in your helpdesk. The X-Auth-Token should be passed as a request header.

A future Mods for HESK release will allow:

  • the generation of "generic" tokens to be used by an application and will not be required to be associated with a specific helpdesk user.
  • the generation of a user-specific token via an API endpoint

Which Endpoints Require Authentication?

Next to the API endpoint title, if there is a key (🔑) next to the URI, then authentication is required.

Dates

Regardless of how dates are formatted in HESK, the REST API will always return dates and times in ISO-8601 format. For example: 2017-03-12 13:59:43, where the time will be in the HESK installation's time zone along with the HESK installation's time offset.

Errors

If an unexpected error occurs on the server, a generic 500 response code will be returned along with the following JSON:

{
  "type": "ERROR",
  "title": "Exception Occurred",
  "message": "Fought an uncaught exception. Check the logs for more information. Log ID: ####"
}

Should another error occur when trying to log (such as a database error), the following JSON will be returned instead:

{
  "type": "ERROR",
  "title": "Exception Occurred",
  "message": "Fought an uncaught exception. Additionally, the error could not be logged! :'("
}

You can check the relevant log by going to the "View Message Log" page in your helpdesk

Passing Custom Fields

If an API endpoint supports saving / updating custom fields, The following API convention is used:

"customFields": {
	"#": "customFieldValue"
}

# is the custom field number (1-50). customFieldValue is the string value of the custom field. See the table below for any specific formats that may be required

Custom Field Type
String Representation

text

The value

textarea

The value

email

The value

hidden

The value

select

The value

checkbox

The value

radio

The value

date

ISO-8601 representation of the date (i.e. January 1, 2017 should be sent as 2017-01-01)

readonly

The value

URL Rewriting

The Mods for HESK API supports URL rewriting. This feature can be enabled via the API settings page.

If you enable URL rewriting, follow the instructions on the popover. Also, the /index.php in the base URL on this site can be omitted if URL rewriting is enabled.

Suggest Edits

/tickets

Gets a ticket by the specified tracking ID (and email if required).

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/tickets
curl --request GET \
  --url 'https://www.mods-for-hesk.com/demo/api/index.php/v1/tickets?trackingId=trackingId'
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/tickets',
  qs: { trackingId: 'trackingId' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/tickets?trackingId=trackingId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/tickets?trackingId=trackingId");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/tickets"

querystring = {"trackingId":"trackingId"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 187,
  "trackingId": "2HD-JG3-HWH1",
  "name": "Testy McTest",
  "email": [],
  "categoryId": 1,
  "priorityId": 3,
  "subject": "Testing",
  "message": "<p>Testing</p>",
  "dateCreated": "2016-04-24 16:19:27",
  "lastChanged": "2016-10-31 21:33:55",
  "firstReplyDate": "2016-09-25 22:33:59",
  "closedDate": null,
  "suggestedArticles": [],
  "ipAddress": "127.0.0.1",
  "language": "English",
  "statusId": 3,
  "openedBy": 1,
  "firstReplyByUserId": 1,
  "closedByUserId": null,
  "numberOfReplies": 2,
  "numberOfStaffReplies": 1,
  "ownerId": 1,
  "timeWorked": "00:00:43",
  "lastReplyBy": 0,
  "lastReplier": 1,
  "archived": false,
  "locked": false,
  "attachments": [],
  "mergedTicketIds": [],
  "auditTrailHtml": "<li class=\"smaller\">2016-04-24 19:19:31 | ticket created by Your name (username)</li><li class=\"smaller\">2016-09-26 21:04:48 | locked by Your name (username)</li><li class=\"smaller\">2016-09-26 21:04:59 | unlocked by Your name (username)</li>",
  "customFields": {
    "1": "",
    "2": "",
    "3": "",
    "4": "",
    "5": "",
    "6": "",
    "7": "",
    "8": "",
    "9": ""
  },
  "linkedTicketIds": [],
  "location": [
    "E-1",
    "E-1"
  ],
  "usesHtml": true,
  "userAgent": null,
  "screenResolution": null,
  "dueDate": "2016-06-02 00:00:00",
  "dueDateOverdueEmailSent": true,
  "replies": {
    "101": {
      "id": "101",
      "ticketId": "187",
      "replierName": "Your name",
      "message": "&lt;p&gt;test123&lt;/p&gt;<br><br>Sincerely,&lt;br /&gt;\r\n&lt;br /&gt;\r\nYour name&lt;br /&gt;\r\nYour website&lt;br /&gt;\r\nhttp://www.yourwebsite.com&lt;br /&gt;\r\n&amp;amp; &amp;lt; &amp;gt; ^ &amp;amp;<br>",
      "dateCreated": "2016-09-25 22:33:59",
      "attachments": null,
      "staffId": "1",
      "rating": null,
      "isRead": "1",
      "usesHtml": "1"
    },
    "102": {
      "id": "102",
      "ticketId": "187",
      "replierName": "Testy McTest",
      "message": "&lt;p&gt;Some response from the customer.&lt;/p&gt;",
      "dateCreated": "2016-09-26 13:48:42",
      "attachments": [
        {
          "id": "138",
          "fileName": "Screen-Shot-2016-09-23-at-8.03.28-PM.png",
          "savedName": "e3d5e63e52a54f9a15c5bf192264c3cc.png"
        }
      ],
      "staffId": null,
      "rating": null,
      "isRead": "0",
      "usesHtml": "1"
    }
  }
}
// When tracking ID and email are missing
{
  "type": "ERROR",
  "title": "Validation Failed. Error keys are available in the message section.",
  "message": "MISSING_TRACKING_ID,EMAIL_REQUIRED_AND_MISSING"
}
// Correct tracking ID, but email does not match the ticket's email
{
  "type": "ERROR",
  "title": "Email Does Not Match",
  "message": "Email 'wrong@email.email' entered in for ticket '2UY-VJ2-DPYU' does not match!"
}

Query Params

trackingId
string
required

The ticket tracking ID

email
string

The email address on the ticket. Required if helpdesk requires an email to view tickets

 
Suggest Edits

/tickets

Creates a new ticket for a customer

 
posthttps://www.mods-for-hesk.com/demo/api/index.php/v1/tickets
{
  "name": "Test REST user",
  "email": "email@example.com",
  "category": 2,
  "priority": 2,
  "subject": "Testing the REST endpoint",
  "message": "Can anyone see it?",
  "html": false,
  "location": null,
  "suggestedArticles": [1, 2],
  "userAgent": "SomeRESTClient",
  "screenResolution": [1920, 1080],
  "language": "English",
  "customFields": {
    "1": "Some text",
    "2": "1999-12-31"
  }
}
A binary file was returned

You couldn't be authenticated

{
  "id": 273,
  "trackingId": "27H-1XA-684Z",
  "name": "Test REST user",
  "email": "email@example.com",
  "categoryId": 2,
  "priorityId": 2,
  "subject": "Testing the REST endpoint",
  "message": "Can anyone see it?",
  "dateCreated": "2017-05-01 23:03:22",
  "lastChanged": "2017-05-01 23:03:22",
  "firstReplyDate": null,
  "closedDate": null,
  "suggestedArticles": null,
  "ipAddress": null,
  "language": "English",
  "statusId": 0,
  "openedBy": 0,
  "firstReplyByUserId": null,
  "closedByUserId": null,
  "numberOfReplies": 0,
  "numberOfStaffReplies": 0,
  "ownerId": "1",
  "timeWorked": "00:00:00",
  "lastReplyBy": null,
  "lastReplier": 0,
  "archived": false,
  "locked": false,
  "attachments": [],
  "mergedTicketIds": [],
  "auditTrailHtml": null,
  "customFields": [],
  "linkedTicketIds": [],
  "location": null,
  "usesHtml": false,
  "userAgent": "SomeRESTClient",
  "screenResolution": null,
  "dueDate": null,
  "dueDateOverdueEmailSent": null,
  "replies": []
}
{
  "type": "ERROR",
  "title": "Validation Failed. Error keys are available in the message section.",
  "message": "NO_NAME,INVALID_OR_MISSING_EMAIL,NO_CATEGORY,CRITICAL_PRIORITY_FORBIDDEN,SUBJECT_REQUIRED,MESSAGE_REQUIRED,MISSING_LANGUAGE"
}

Body Params

name
string
required

The customer's name

email
string

The customer's email. Required if the helpdesk requires an email

category
int32
required

The category ID. Use the /categories endpoint to get a list of possible categories

priority
int32

The priority level. Required if users can assign priority; however, users cannot assign a critical priority!

subject
string

The ticket subject. Required if the helpdesk requires a subject

message
string

The ticket message. Required if the helpdesk requires a message

html
boolean
required

true if message contents should be parsed as HTML/rich text, false otherwise

location
array of integers

2-element array: [latitude, longitude]

suggestedArticles
array of integers

Suggested knowledgebase article IDs

userAgent
string

The user's user agent

screenResolution
array of integers

2 element array: [screen width, screen height]

language
string
required

The user's language. Must be an active language in HESK

customFields
object

Custom fields. Consult the "General Information" section for more information

 

Response Statuses

201 - Ticket created
202 - Ticket received, but customer's email requires verification. Once the email is verified it will appear in the ticket system for staff to respond to.

Required Permissions: None

This endpoint DOES NOT require authentication

Suggest Edits

/tickets/:id/replies

Creates a new ticket for a customer

 
posthttps://www.mods-for-hesk.com/demo/api/index.php/v1/tickets/id/replies
{
  "email": "email@example.com",
  "trackingId": "H45-3Z5-7XS1",
  "message": "My test reply from REST",
  "html": false,
  "ip": "127.0.0.1"
}
A binary file was returned

You couldn't be authenticated

{
    "id": "186",
    "ticketId": "297",
    "replierName": "test",
    "message": "My test reply from REST",
    "dateCreated": "2018-05-19 22:16:45",
    "html": false
}
{
    "type": "ERROR",
    "title": "Validation Failed. Error keys are available in the message section.",
    "message": "MESSAGE_REQUIRED,IP_REQUIRED,HAS_HTML_REQUIRED,EMAIL_REQUIRED,TICKET_ID_TRACKING_NUMBER_MISMATCH"
}
{
    "type": "ERROR",
    "title": "Ticket not found",
    "message": "Ticket with tracking ID H45-3Z5-7XS1 not found."
}
// IP Temporarily Banned
{
    "type": "ERROR",
    "title": "The IP address entered has been locked out of the system for 10 minutes because of too many login failures",
    "message": "Locked Out"
}

// Reply flooding prevention
{
    "type": "ERROR",
    "title": "You have been locked out of the system for 10 minutes because of too many replies to a ticket.",
    "message": "Locked Out"
}

Path Params

id
int32
required

The ticket ID

Body Params

email
string

The contact's email address. Required if email addresses are needed to view tickets.

trackingId
string
required

The ticket tracking ID. Required to prevent automated reply spam

message
string
required

The contents of the reply

html
boolean
required

true if the message contains HTML, false otherwise

ip
string
required

The contact's IP address

 

Required Permissions: None

This endpoint DOES NOT require authentication

Suggest Edits

🔑 /staff/tickets/:id

Gets a ticket by the specified tracking ID (and email if required). This does NOT require an X-Auth-Token

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 187,
  "trackingId": "2HD-JG3-HWH1",
  "name": "Testy McTest",
  "email": [],
  "categoryId": 1,
  "priorityId": 3,
  "subject": "Testing",
  "message": "&lt;p&gt;Testing&lt;/p&gt;",
  "dateCreated": "2016-04-24 16:19:27",
  "lastChanged": "2016-10-31 21:33:55",
  "firstReplyDate": "2016-09-25 22:33:59",
  "closedDate": null,
  "suggestedArticles": [],
  "ipAddress": "127.0.0.1",
  "language": "English",
  "statusId": 3,
  "openedBy": 1,
  "assignedBy": null,
  "firstReplyByUserId": 1,
  "closedByUserId": null,
  "numberOfReplies": 2,
  "numberOfStaffReplies": 1,
  "ownerId": 1,
  "timeWorked": "00:00:43",
  "lastReplyBy": 0,
  "lastReplier": 1,
  "archived": false,
  "locked": false,
  "attachments": [],
  "mergedTicketIds": [],
  "auditTrailHtml": "<li class=\"smaller\">2016-04-24 19:19:31 | ticket created by Your name (username)</li><li class=\"smaller\">2016-09-26 21:04:48 | locked by Your name (username)</li><li class=\"smaller\">2016-09-26 21:04:59 | unlocked by Your name (username)</li>",
  "customFields": {
    "1": "",
    "2": "",
    "3": "",
    "4": "",
    "5": "",
    "6": "",
    "7": "",
    "8": "",
    "9": ""
  },
  "linkedTicketIds": [],
  "location": [
    "E-1",
    "E-1"
  ],
  "usesHtml": true,
  "userAgent": null,
  "screenResolution": null,
  "dueDate": "2016-06-02 00:00:00",
  "dueDateOverdueEmailSent": true,
  "replies": {
    "101": {
      "id": "101",
      "ticketId": "187",
      "replierName": "Your name",
      "message": "&lt;p&gt;test123&lt;/p&gt;<br><br>Sincerely,&lt;br /&gt;\r\n&lt;br /&gt;\r\nYour name&lt;br /&gt;\r\nYour website&lt;br /&gt;\r\nhttp://www.yourwebsite.com&lt;br /&gt;\r\n&amp;amp; &amp;lt; &amp;gt; ^ &amp;amp;<br>",
      "dateCreated": "2016-09-25 22:33:59",
      "attachments": null,
      "staffId": "1",
      "rating": null,
      "isRead": "1",
      "usesHtml": "1"
    },
    "102": {
      "id": "102",
      "ticketId": "187",
      "replierName": "Testy McTest",
      "message": "&lt;p&gt;Some response from the customer.&lt;/p&gt;",
      "dateCreated": "2016-09-26 13:48:42",
      "attachments": [
        {
          "id": "138",
          "fileName": "Screen-Shot-2016-09-23-at-8.03.28-PM.png",
          "savedName": "e3d5e63e52a54f9a15c5bf192264c3cc.png"
        }
      ],
      "staffId": null,
      "rating": null,
      "isRead": "0",
      "usesHtml": "1"
    }
  }
}
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to ticket 237!"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket 237 not found!"
}

Path Params

id
int32
required

The ticket ID. Not the tracking ID.

 

Required Permissions: can_view_tickets

Suggest Edits

🔑 /staff/tickets/:id

Deletes a ticket

 
deletehttps://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id
curl --request DELETE \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

 
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to ticket 123!"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket 123 not found!"
}

Path Params

id
int32
required

The ticket ID. Not the Tracking ID

 

Necessary Permissions: can_view_tickets, can_delete_tickets

Suggest Edits

🔑 /staff/tickets/:id

Updates the basic information for an already existing ticket

 
puthttps://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/id
{
  "language": "English",
  "name": "First Last",
  "subject": "Subject",
  "message": "Editing my message!",
  "html": false,
  "email": "sample@example.com;sample2@example.com",
  "customFields": {
    "1": "Billing"
  }
}
A binary file was returned

You couldn't be authenticated

 
{
  "type": "ERROR",
  "title": "Validation Failed. Error keys are available in the message section.",
  "message": "NO_NAME,INVALID_OR_MISSING_EMAIL,SUBJECT_REQUIRED,MESSAGE_REQUIRED,MISSING_LANGUAGE"
}
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to ticket 123!"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket with ID 123 not found!"
}

Path Params

id
int32
required

The ticket ID. Not the tracking ID.

Body Params

language
string

The user's language. Must be an active language in your helpdesk install. Required if helpdesk supports multiple languages

name
string
required

The customer's name

subject
string

The ticket subject. Required if helpdesk requires subjects

message
string

The ticket message. Required if helpdesk requires messages

html
boolean
required

true if the message should be stored as rich-text, false otherwise

email
string

The user's email. Multiple emails supported (separated by ; or ,) if multiple emails are enabled. Required if emails are enabled

customFields
object

Custom Fields. Consult the "Custom Fields" section for more info

 

Necessary Permissions: can_view_tickets, can_edit_tickets

400 Response Error Keys

A 400 response will result in possibly several error keys being returned in the message section. Consult the table below for what error key represents.

Key
Description

NO_NAME

The name is null or blank and a name is required

INVALID_OR_MISSING_EMAIL

There is no email and it is required, OR one of the email addresses are not valid

SUBJECT_REQUIRED

The subject is null or blank and a subject is required

MESSAGE_REQUIRED

The message is null or blank and a message is required

MISSING_LANGUAGE

The language is null or blank and the helpdesk supports multiple languages

Suggest Edits

🔑 /staff/tickets/:id/attachments

Uploads an attachment for a ticket

 
post/staff/tickets/id/attachments
{
  "displayName": "filename.txt",
  "isEditing": false, // false if adding an attachment to a 'new' ticket, true if editing an existing one
  "data": "c3RyaW5n"
}
A binary file was returned

You couldn't be authenticated

{
  "ticketTrackingId": "2UY-VJ2-DPYU",
  "type": 0,
  "id": 161,
  "savedName": "2UY-VJ2-DPYU_683c083bff392d7cdd76b9dfbe28dfd8.txt",
  "displayName": "filename.txt",
  "fileSize": 6,
  "downloadCount": 0
}
// When the user does not have access to the ticket (viewing or editing)
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to ticket 237 being created / edited!"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket 123 not found!"
}

Path Params

id
int32
required

The ticket ID. Not the tracking ID.

Body Params

displayName
string
required

The file name, including extension

data
string
required

The attachment contents, base64-encoded.

 

Required Permissions: can_view_tickets, can_edit_tickets if isEditing == true

Response Params

Name
Datatype
Description

ticketTrackingId

string

The ticket tracking ID

type

int

0 - Ticket Message
1 - Ticket Reply

id

int

The attachment ID

savedName

string

The name of the file in the filesystem

displayName

string

The name of the file the user sees

fileSize

int

The size of the file, in bytes

downloadCount

int

The number of times the file was downloaded

Suggest Edits

🔑 /staff/tickets/:ticketId/attachments/:attachmentId

Returns the attachment contents for the specified ticket and attachment (contents are base64-encoded)

 
get/staff/tickets/ticketId/attachments/attachmentId
curl --request GET \
  --url http://example.com/staff/tickets/ticketId/attachments/attachmentId
var request = require("request");

var options = { method: 'GET',
  url: 'http://example.com/staff/tickets/ticketId/attachments/attachmentId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/staff/tickets/ticketId/attachments/attachmentId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://example.com/staff/tickets/ticketId/attachments/attachmentId");

xhr.send(data);
import requests

url = "http://example.com/staff/tickets/ticketId/attachments/attachmentId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "contents": "c3RyaW5n"
}
// Returned when the user does not have access to the ticket / attachment
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to attachment 161!"
}
// Attachment Not Found in Filesystem
{
  "type": "ERROR",
  "title": "File Not Found",
  "message": "The file 'filename' does not exist on the server"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket 123 not found!"
}

Path Params

ticketId
int32
required

The ticket ID. Not the tracking ID.

attachmentId
int32
required

The attachment ID

 

Required Permissions: can_view_tickets

Suggest Edits

🔑 /staff/tickets/:ticketId/attachments/:attachmentId

Deletes an attachment from the corresponding ticket

 
deletehttps://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId
curl --request DELETE \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/staff/tickets/ticketId/attachments/attachmentId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

 
// When the user does not have access to the ticket (viewing or editing)
{
  "type": "ERROR",
  "title": "Access Exception",
  "message": "User does not have access to ticket 237 being created / edited!"
}
{
  "type": "ERROR",
  "title": "Ticket Not Found",
  "message": "Ticket 123 not found!"
}

Path Params

ticketId
int32
required

The ticket ID. Not the tracking ID.

attachmentId
int32
required

The attachment ID.

 

Required Permissions: can_view_tickets, can_edit_tickets

Suggest Edits

🔑 /categories/all

Gets all categories

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/all"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "1": {
    "id": 1,
    "name": "General",
    "catOrder": 10,
    "autoAssign": true,
    "type": 0,
    "usage": 1,
    "color": "#0000ff",
    "priority": 2,
    "manager": null,
    "accessible": true,
    "description": ""
  },
  "2": {
    "id": 2,
    "name": "Billing",
    "catOrder": 20,
    "autoAssign": true,
    "type": 0,
    "usage": 0,
    "color": "#ff0000",
    "priority": 0,
    "manager": null,
    "accessible": true,
    "description": ""
  },
  "3": {
    "id": 3,
    "name": "Support",
    "catOrder": 30,
    "autoAssign": true,
    "type": 1,
    "usage": 0,
    "color": "#d8da6c",
    "priority": 3,
    "manager": null,
    "accessible": true,
    "description": ""
  },
  "4": {
    "id": 4,
    "name": "Maintenance",
    "catOrder": 50,
    "autoAssign": true,
    "type": 0,
    "usage": 0,
    "color": null,
    "priority": 3,
    "manager": null,
    "accessible": true,
    "description": ""
  },
  "8": {
    "id": 8,
    "name": "Test &amp; Test",
    "catOrder": 40,
    "autoAssign": false,
    "type": 0,
    "usage": 0,
    "color": "#000000",
    "priority": 3,
    "manager": null,
    "accessible": true,
    "description": ""
  }
}
 
Suggest Edits

🔑 /categories/:id

Get a specific category by ID

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 1,
  "name": "General",
  "catOrder": 10,
  "autoAssign": true,
  "type": 0,
  "usage": 1,
  "color": "#0000ff",
  "priority": 2,
  "manager": null,
  "accessible": true,
  "description": ""
}
{
  "type": "ERROR",
  "title": "Category Not Found",
  "message": "Category 50 not found!"
}

Path Params

id
string
required

The category ID

 
Suggest Edits

🔑 /categories

Creates a new category

 
posthttps://www.mods-for-hesk.com/demo/api/index.php/v1/categories
{
	"autoassign": false,
	"backgroundColor": "#ff0000",
	"description": "Some category description",
	"displayBorder": true,
	"foregroundColor": "AUTO",
	"manager": null,
	"name": "Category Name from REST",
	"priority": 2,
	"type": 0,
	"usage": 1
}
A binary file was returned

You couldn't be authenticated

{
  "id": 11,
  "name": "Category Name from REST",
  "catOrder": 70,
  "autoAssign": false,
  "type": 0,
  "usage": 1,
  "backgroundColor": "#ff0000",
  "foregroundColor": "AUTO",
  "displayBorder": true,
  "priority": 2,
  "manager": null,
  "description": "Some category description"
}
{
  "type": "ERROR",
  "title": "Validation Failed. Error keys are available in the message section.",
  "message": "BACKGROUND_COLOR_MISSING,FOREGROUND_COLOR_MISSING,NAME_MISSING,INVALID_PRIORITY,INVALID_AUTOASSIGN,INVALID_DISPLAY_BORDER,INVALID_TYPE,INVALID_TYPE",
  "logId": 400
}

Body Params

autoassign
boolean
required

true to enable autoassign for the category, false otherwise

backgroundColor
string
required

The background color for the category, in hex (i.e. #FF0000)

description
string

The category description

displayBorder
boolean
required

Choose to decide whether or not to display a border around the category (uses foreground color). This is ignored if foregroundColor is "AUTO".

foregroundColor
string
required

The foreground (text) color of the category. Either hex (i.e. #FF0000) or "AUTO" to use white or black, depending on background color.

manager
int32
required

The category manager, or null for no manager

name
string
required

The name of the category

priority
int32
required

The category priority (0 -> Critical, 1 -> High, 2 -> Medium, 3 -> Low)

type
int32
required

Category visibility (1 for private, 0 for public)

usage
int32
required

1 for tickets only, 2 for calendar events only, 0 for both

 
Suggest Edits

🔑 /categories

Creates a new category

 
puthttps://www.mods-for-hesk.com/demo/api/index.php/v1/categories/id
{
	"autoassign": false,
	"backgroundColor": "#ff0000",
	"description": "Some category description",
	"displayBorder": true,
	"foregroundColor": "AUTO",
	"manager": null,
	"name": "Category Name from REST",
	"priority": 2,
	"type": 0,
	"usage": 1
}
A binary file was returned

You couldn't be authenticated

{
  "id": 11,
  "name": "Category Name from REST",
  "catOrder": 70,
  "autoAssign": false,
  "type": 0,
  "usage": 1,
  "backgroundColor": "#ff0000",
  "foregroundColor": "AUTO",
  "displayBorder": true,
  "priority": 2,
  "manager": null,
  "description": "Some category description"
}
{
  "type": "ERROR",
  "title": "Validation Failed. Error keys are available in the message section.",
  "message": "BACKGROUND_COLOR_MISSING,FOREGROUND_COLOR_MISSING,NAME_MISSING,INVALID_PRIORITY,INVALID_AUTOASSIGN,INVALID_DISPLAY_BORDER,INVALID_TYPE,INVALID_TYPE",
  "logId": 400
}

Path Params

id
int32
required

The category ID

Body Params

autoassign
boolean
required

true to enable autoassign for the category, false otherwise

backgroundColor
string
required

The background color for the category, in hex (i.e. #FF0000)

description
string

The category description

displayBorder
boolean
required

Choose to decide whether or not to display a border around the category (uses foreground color). This is ignored if foregroundColor is "AUTO".

foregroundColor
string
required

The foreground (text) color of the category. Either hex (i.e. #FF0000) or "AUTO" to use white or black, depending on background color.

manager
int32
required

The category manager, or null for no manager

name
string
required

The name of the category

priority
int32
required

The category priority (0 -> Critical, 1 -> High, 2 -> Medium, 3 -> Low)

type
int32
required

Category visibility (1 for private, 0 for public)

usage
int32
required

1 for tickets only, 2 for calendar events only, 0 for both

catOrder
int32
required

The category order. Categories are re-numbered after saving; however the order will be retained!

 
Suggest Edits

/calendar/business-hours

Gets Business Hours

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/business-hours"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "dayOfWeek": 0, // Sunday
        "startTime": "8:00",
        "endTime": "17:00"
    },
    {
        "dayOfWeek": 1, // Monday
        "startTime": "9:00",
        "endTime": "18:00"
    },
    {
        "dayOfWeek": 2, // Tuesday
        "startTime": "10:41",
        "endTime": "19:38"
    },
    {
        "dayOfWeek": 3, // Wednesday
        "startTime": "01:00",
        "endTime": "20:00"
    },
    {
        "dayOfWeek": 4, // Thursday
        "startTime": "17:00",
        "endTime": "19:00"
    },
    {
        "dayOfWeek": 5, // Friday
        "startTime": "18:00",
        "endTime": "20:00"
    },
    {
        "dayOfWeek": 6, // Saturday
        "startTime": "22:00",
        "endTime": "23:00"
    }
]
 
Suggest Edits

/calendar/events

Gets Calendar Events (Customer-side)

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events
curl --request GET \
  --url 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events?start=start&end=end'
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events',
  qs: 
   { start: 'start',
     end: 'end' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events?start=start&end=end")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events?start=start&end=end");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events"

querystring = {"start":"start","end":"end"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "type": "CALENDAR",
        "endTime": "2018-03-30 00:00:00",
        "allDay": true,
        "location": "Location",
        "comments": "",
        "reminderValue": null,
        "reminderUnits": null,
        "auditTrail": [
            {
                "id": 151,
                "entityId": 106,
                "entityType": "CALENDAR_EVENT",
                "languageKey": "audit_event_created",
                "date": "2018-03-23 16:44:50",
                "replacementValues": [
                    "Your name (username)"
                ]
            }
        ],
        "id": 106,
        "startTime": "2018-03-30 00:00:00",
        "title": "Test for email",
        "categoryId": 2,
        "categoryName": "Billing",
        "backgroundColor": "#ff0000",
        "foregroundColor": "AUTO",
        "displayBorder": false
    }
]

Query Params

start
int64
required

Starting time, in milliseconds since January 1 1970 00:00 UTC

end
int64
required

Ending time, in milliseconds since January 1 1970 00:00 UTC

 
Suggest Edits

🔑 /calendar/events/staff

Gets Calendar Events (Staff-side)

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff
curl --request GET \
  --url 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff?start=start&end=end'
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff',
  qs: 
   { start: 'start',
     end: 'end' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff?start=start&end=end")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff?start=start&end=end");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff"

querystring = {"start":"start","end":"end"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "type": "CALENDAR",
        "endTime": "2017-12-26 00:00:00",
        "allDay": true,
        "location": "TEST",
        "comments": "",
        "reminderValue": null,
        "reminderUnits": null,
        "auditTrail": [
            {
                "id": 118,
                "entityId": 105,
                "entityType": "CALENDAR_EVENT",
                "languageKey": "audit_event_created",
                "date": "2018-01-24 02:47:53",
                "replacementValues": [
                    "Your name (username)"
                ]
            },
            {
                "id": 121,
                "entityId": 105,
                "entityType": "CALENDAR_EVENT",
                "languageKey": "audit_event_updated",
                "date": "2018-01-26 02:53:20",
                "replacementValues": [
                    "Your name (username)"
                ]
            },
            {
                "id": 122,
                "entityId": 105,
                "entityType": "CALENDAR_EVENT",
                "languageKey": "audit_event_updated",
                "date": "2018-01-26 02:56:32",
                "replacementValues": [
                    "Your name (username)"
                ]
            },
            {
                "id": 125,
                "entityId": 105,
                "entityType": "CALENDAR_EVENT",
                "languageKey": "audit_event_updated",
                "date": "2018-01-26 03:00:34",
                "replacementValues": [
                    "Your name (username)"
                ]
            }
        ],
        "id": 105,
        "startTime": "2017-12-26 00:00:00",
        "title": "TEST",
        "categoryId": 2,
        "categoryName": "Billing",
        "backgroundColor": "#ff0000",
        "foregroundColor": "AUTO",
        "displayBorder": false
    }
]

Query Params

start
int64
required

Starting time, in milliseconds since January 1 1970 00:00 UTC

end
int64
required

Ending time, in milliseconds since January 1 1970 00:00 UTC

 
Suggest Edits

🔑 /calendar/events/staff

Creates an event

 
posthttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff
curl --request POST \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff
var request = require("request");

var options = { method: 'POST',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "type": "CALENDAR",
    "endTime": "2018-01-03 16:00:00",
    "allDay": false,
    "location": "Your REST client",
    "comments": "Some super fancy comment",
    "reminderValue": null,
    "reminderUnits": null,
    "auditTrail": [],
    "id": 107,
    "startTime": "2018-01-01 15:00:00",
    "title": "REST Event",
    "categoryId": 1,
    "categoryName": "General",
    "backgroundColor": "#0000ff",
    "foregroundColor": "AUTO",
    "displayBorder": false
}

Body Params

startTime
string
required

The start time, in YYYY-MM-DD HH:mm:ss. Time is ignored if allDay is true.

endTime
string
required

The end time, in YYYY-MM-DD HH:mm:ss. Time is ignored if allDay is true.

allDay
boolean
required

true if an all-day event, false otherwise.

title
string
required

The title of the event

location
string

The location of the event

comments
string

Any comments regarding the event

categoryId
int32
required

The corresponding category ID the event belongs in

reminderUnits
string

If a reminder should be set for this user, select one of MINUTE, HOUR, DAY, or WEEK..

reminderValue
string

The amount of time that corresponds with the reminderUnits

 
Suggest Edits

🔑 /calendar/events/staff/:id

Edits an event

 
puthttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id
curl --request PUT \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "type": "CALENDAR",
    "endTime": "2018-01-03 16:00:00",
    "allDay": false,
    "location": "Your REST client",
    "comments": "Some super fancy comment",
    "reminderValue": null,
    "reminderUnits": null,
    "auditTrail": [],
    "id": 107,
    "startTime": "2018-01-01 15:00:00",
    "title": "REST Event",
    "categoryId": 1,
    "categoryName": "General",
    "backgroundColor": "#0000ff",
    "foregroundColor": "AUTO",
    "displayBorder": false
}

Body Params

startTime
string
required

The start time, in YYYY-MM-DD HH:mm:ss. Time is ignored if allDay is true.

endTime
string
required

The end time, in YYYY-MM-DD HH:mm:ss. Time is ignored if allDay is true.

allDay
boolean
required

true if an all-day event, false otherwise.

title
string
required

The title of the event

location
string

The location of the event

comments
string

Any comments regarding the event

categoryId
int32
required

The corresponding category ID the event belongs in

reminderUnits
string

If a reminder should be set for this user, select one of MINUTE, HOUR, DAY, or WEEK..

reminderValue
string

The amount of time that corresponds with the reminderUnits

 
Suggest Edits

🔑 /calendar/events/staff/:id

Deletes an event

 
deletehttps://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id
curl --request DELETE \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/calendar/events/staff/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

No response examples available
 
Suggest Edits

🔑 /statuses

Retrieves all ticket statuses

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/statuses
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/statuses
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/statuses' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/statuses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/statuses");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/statuses"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 0,
    "textColor": "#FF0000",
    "defaultActions": [
      "IsNewTicketStatus"
    ],
    "closable": "yes",
    "sort": 10,
    "localizedNames": {
      "English": "New"
    }
  },
  {
    "id": 1,
    "textColor": "#FF9933",
    "defaultActions": [
      "IsCustomerReplyStatus",
      "IsStaffReopenedStatus"
    ],
    "closable": "yes",
    "sort": 20,
    "localizedNames": {
      "English": "Waiting reply"
    }
  },
  {
    "id": 2,
    "textColor": "#0000FF",
    "defaultActions": [],
    "closable": "yes",
    "sort": 30,
    "localizedNames": {
      "English": "Replied"
    }
  },
  {
    "id": 3,
    "textColor": "#008000",
    "defaultActions": [
      "IsClosed",
      "IsClosedByClient",
      "IsStaffClosedOption",
      "LockedTicketStatus",
      "IsAutocloseOption"
    ],
    "closable": "yes",
    "sort": 40,
    "localizedNames": {
      "English": "Resolved"
    }
  },
  {
    "id": 4,
    "textColor": "#000000",
    "defaultActions": [],
    "closable": "yes",
    "sort": 50,
    "localizedNames": {
      "English": "In Progress"
    }
  },
  {
    "id": 5,
    "textColor": "#000000",
    "defaultActions": [
      "IsDefaultStaffReplyStatus"
    ],
    "closable": "yes",
    "sort": 60,
    "localizedNames": {
      "English": "On Hold"
    }
  },
  {
    "id": 6,
    "textColor": "#000000",
    "defaultActions": [],
    "closable": "yes",
    "sort": 70,
    "localizedNames": {
      "English": "test"
    }
  }
]
 

Permissions Required: None

Response

Name
Datatype
Description

id

int

The status ID

textColor

string

The status color, in hex

defaultActions

array of string

array containing 0 or more of the following:

  • IsNewTicketStatus
  • IsCustomerReplyStatus
  • IsStaffReopenedStatus
  • IsClosed
  • IsClosedByClient
  • IsStaffClosedOption
  • LockedTicketStatus
  • IsAutocloseOption
  • IsDefaultStaffReplyStatus

closable

string

Determines whether or not status can close the ticket. Will be one of the following:

  • "yes"
  • "no"
  • "conly" -- customers only
  • "sonly" -- staff only

sort

int

The sort value if not using user-defined order. Statuses should be sorted from lowest value to highest.

localizedNames

associative array / map

List of languages to their display value

Suggest Edits

/service-messages

Retrieves all service messages

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "id": "13",
        "dateCreated": "2017-11-12 20:57:06",
        "createdBy": 1,
        "title": "Test Service Message Title",
        "message": "<p>Test Service Message &lt; 1</p>",
        "style": "ERROR",
        "published": true,
        "order": 10,
        "icon": "fa fa-times-circle",
        "locations": [
            "CUSTOMER_HOME",
            "CUSTOMER_KB_HOME",
            "CUSTOMER_VIEW_KB_ARTICLE",
            "CUSTOMER_SUBMIT_TICKET",
            "CUSTOMER_VIEW_TICKET",
            "STAFF_LOGIN",
            "STAFF_HOME",
            "STAFF_KB_HOME",
            "STAFF_VIEW_KB_ARTICLE",
            "STAFF_SUBMIT_TICKET",
            "STAFF_VIEW_TICKET"
        ],
        "language": "en"
    },
    {
        "id": "14",
        "dateCreated": "2017-11-14 12:51:15",
        "createdBy": 1,
        "title": "TEST2",
        "message": "<p>TEST2</p>",
        "style": "INFO",
        "published": false,
        "order": 20,
        "icon": "fa fa-comment",
        "locations": [
            "CUSTOMER_HOME"
        ],
        "language": "ALL"
    },
    {
        "id": "18",
        "dateCreated": "2017-11-27 13:00:01",
        "createdBy": 1,
        "title": "TEST",
        "message": "<p>TEST</p>",
        "style": "NOTICE",
        "published": true,
        "order": 30,
        "icon": "fa fa-exclamation-triangle",
        "locations": [
            "CUSTOMER_HOME"
        ],
        "language": "ALL"
    }
]
 

Authentication

This endpoint will return different information, depending on if you call this endpoint with an authenticated user or not:

X-Auth-Token Provided?
What Kinds of Service Messages Are Returned?
What Service Message Locations Are Returned?

No token

Published only

Customer-facing pages only

X-Auth-Token provided, but user cannot manage service messages

Published only

Customer and staff pages

X-Auth-Token provided and user can manage service messages

Published and Draft

Customer and staff pages

Response Body

Property
Description
Datatype

id

The unique identifier for the service message

int

dateCreated

The date the service message was created

string

createdBy

The ID of the user who created the service message

int

title

The title of the service message

string

message

The message contents (may be HTML-encoded).

string

style

The display style of the service message. May be NONE, INFO, NOTICE, SUCCESS, or ERROR

string

published

true if published
false if draft

bool

order

The display order of the service message

int

icon

The font icon associated with the service message. May be blank.

string

locations

List of locations to display the service message. Possible choices:

  • CUSTOMER_HOME
  • CUSTOMER_KB_HOME
  • CUSTOMER_VIEW_KB_ARTICLE
  • CUSTOMER_SUBMIT_TICKET
  • CUSTOMER_VIEW_TICKET
  • STAFF_LOGIN
  • STAFF_HOME
  • STAFF_KB_HOME
  • STAFF_VIEW_KB_ARTICLE
  • STAFF_SUBMIT_TICKET
  • STAFF_VIEW_TICKET

array of strings

language

The language to display the service message for, or ALL for all languages

string

Suggest Edits

🔑 /service-messages

Creates a Service Message

 
posthttps://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages
curl --request POST \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages
var request = require("request");

var options = { method: 'POST',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": 19,
    "dateCreated": "2017-11-30 12:54:00",
    "createdBy": 1,
    "title": "Test Service Message Title",
    "message": "Test service message",
    "style": "ERROR",
    "published": true,
    "order": 40,
    "icon": "fa fa-times-circle",
    "locations": [
        "CUSTOMER_HOME"
    ],
    "language": "ALL"
}
{
    "type": "ERROR",
    "title": "Validation Failed. Error keys are available in the message section.",
    "message": "MISSING_MESSAGE,MISSING_LANGUAGE,MISSING_TITLE,MISSING_STYLE,INVALID_STYLE,MISSING_LOCATIONS",
    "logId": 400
}

Body Params

icon
string

The font icon to use, blank ("") for no icon, or null to use the default icon based on the style

title
string
required

The title of the service message

message
string
required

The message to display. May contain HTML.

published
boolean
required

true for published, false for draft

style
string
required

The style of the service message. Can be NONE, INFO, NOTICE, SUCCESS, or ERROR

locations
array of strings
required

List of locations to display the service message. See the locations property at GET /service-messages for a complete list

language
string
required

The language code to display the service message for, or ALL for all languages

 
Suggest Edits

🔑 /service-messages/:id

Edits an Existing Service Message

 
puthttps://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id
curl --request PUT \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": "13",
    "dateCreated": "2017-11-12 20:57:06",
    "createdBy": 1,
    "title": "Test Service Message Title",
    "message": "Test service message",
    "style": "ERROR",
    "published": true,
    "order": 10,
    "icon": "fa fa-times-circle",
    "locations": [
        "CUSTOMER_HOME"
    ],
    "language": "ALL"
}
{
    "type": "ERROR",
    "title": "Validation Failed. Error keys are available in the message section.",
    "message": "MISSING_MESSAGE,MISSING_LANGUAGE,MISSING_TITLE,MISSING_STYLE,INVALID_STYLE,MISSING_LOCATIONS",
    "logId": 400
}

Path Params

id
int32
required

The ID of the service message being edited

Body Params

icon
string

The font icon to use, blank ("") for no icon, or null to use the default icon based on the style

title
string
required

The title of the service message

message
string
required

The message to display. May contain HTML.

published
boolean
required

true for published, false for draft

style
string
required

The style of the service message. Can be NONE, INFO, NOTICE, SUCCESS, or ERROR

locations
array of strings
required

List of locations to display the service message. See the locations property at GET /service-messages for a complete list

language
string
required

The language code to display the service message for, or ALL for all languages

 
Suggest Edits

🔑 /service-messages/:id

Deletes a Service Message

 
deletehttps://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id
curl --request DELETE \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/service-messages/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Path Params

id
int32
required

The ID of the service message that should be deleted

 
Suggest Edits

🔑 /settings

Retrieves HESK settings

 
gethttps://www.mods-for-hesk.com/demo/api/index.php/v1/settings
curl --request GET \
  --url https://www.mods-for-hesk.com/demo/api/index.php/v1/settings
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.mods-for-hesk.com/demo/api/index.php/v1/settings' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://www.mods-for-hesk.com/demo/api/index.php/v1/settings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://www.mods-for-hesk.com/demo/api/index.php/v1/settings");

xhr.send(data);
import requests

url = "https://www.mods-for-hesk.com/demo/api/index.php/v1/settings"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "site_title": "My Web site",
  "site_url": "http://www.example.com",
  "hesk_title": "Help Desk",
  "hesk_url": "http://localhost:8000",
  "webmaster_mail": "noreply@example.com",
  "noreply_mail": "support@example.com",
  "can_sel_lang": 1,
  "language": "English",
  "languages": {
    "English": {
      "folder": "en",
      "hr": "------ Reply above this line ------"
    }
  },
  "max_listings": 20,
  "print_font_size": 12,
  "max_open": 0,
  "new_top": 0,
  "reply_top": 0,
  "require_email": 1,
  "require_owner": 0,
  "require_subject": 1,
  "require_message": 1,
  "custclose": 1,
  "custopen": 1,
  "rating": 1,
  "cust_urgency": 1,
  "sequential": 1,
  "time_worked": 1,
  "spam_notice": 1,
  "list_users": 0,
  "debug_mode": 1,
  "short_link": 0,
  "select_cat": 0,
  "select_pri": 0,
  "cat_show_select": 10,
  "email_view_ticket": 0,
  "attachments": "0",
  "kb_enable": 1,
  "kb_wysiwyg": 1,
  "kb_search": 2,
  "kb_search_limit": 10,
  "kb_views": 1,
  "kb_date": 1,
  "kb_recommendanswers": 1,
  "kb_rating": 1,
  "kb_substrart": 200,
  "kb_cols": 2,
  "kb_numshow": 3,
  "kb_popart": 6,
  "kb_latest": 6,
  "kb_index_popart": 3,
  "kb_index_latest": 3,
  "kb_related": 5,
  "detect_typos": 1,
  "strip_quoted": 1,
  "eml_req_msg": 0,
  "save_embedded": 1,
  "multi_eml": 0,
  "confirm_email": 0,
  "open_only": 1,
  "ticket_list": [
    "trackid",
    "lastchange",
    "name",
    "subject",
    "status",
    "lastreplier"
  ],
  "submittedformat": 2,
  "updatedformat": 2,
  "diff_hours": 0,
  "diff_minutes": 0,
  "daylight": 1,
  "timeformat": "Y-m-d H:i:s",
  "ip_whois": "https://whois.domaintools.com/{IP}",
  "maintenance_mode": 0,
  "check_updates": 1,
  "rich_text_for_tickets_for_customers": "1",
  "rtl": "0",
  "show_icons": "1",
  "custom_field_setting": "0",
  "customer_email_verification_required": "0",
  "html_emails": "1",
  "use_bootstrap_theme": "1",
  "new_kb_article_visibility": "0",
  "show_number_merged": "1",
  "request_location": "1",
  "category_order_column": "name",
  "rich_text_for_tickets": "1",
  "statuses_order_column": "sort",
  "navbarBackgroundColor": "#414a5c",
  "navbarBrandColor": "#d4dee7",
  "navbarBrandHoverColor": "#ffffff",
  "navbarItemTextColor": "#d4dee7",
  "navbarItemTextHoverColor": "#ffffff",
  "navbarItemTextSelectedColor": "#ffffff",
  "navbarItemSelectedBackgroundColor": "#2d3646",
  "dropdownItemTextColor": "#333333",
  "dropdownItemTextHoverColor": "#262626",
  "dropdownItemTextHoverBackgroundColor": "#f5f5f5",
  "questionMarkColor": "#000",
  "display_user_agent_information": "1",
  "navbar_title_url": "http://localhost:8000",
  "enable_calendar": "1",
  "first_day_of_week": "1",
  "default_calendar_view": "month",
  "admin_color_scheme": "skin-blue"
}
 

Permissions Required: None