Data API

You can use these APIs to retrieve information about different objects in a page. Data APIs are supported in the following locations:

Global Data APIs

loggedInUser -This API returns the agent information object of the logged in agent.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("loggedInUser").then ( function(data) { // success operation // "data" is {loggedInUser: {agent: {…}}} }, function(error) { // failure operation } );
Sample Payload EXPAND ↓
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ "loggedInUser":{ "agent":{ "id": 1, "user_id": 1, "signature": null, "created_at": "2017-10-26T19:40:13+05:30", "updated_at": "2017-10-26T19:40:13+05:30", "ticket_permission": 1, "occasional": false, "google_viewer_id": null, "signature_html": null, "points": null, "scoreboard_level_id": null, "available": true, "active_since": null, "scopes": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30", "department_names": "", "location_name": null }, "group_ids": "[]" } } }

The following table lists the attributes of the logged_in_user object:

ATTRIBUTE TYPE DESCRIPTION
available boolean If the agent is in a group that has enabled Automatic Ticket Assignment, this attribute will be set to true if the agent is accepting new tickets.
created_at datetime Contact creation timestamp
group_ids array of strings Group IDs associated with the agent
id number User ID of the agent
occasional boolean Set to true if this is an occasional agent (false denotes full-time)
signature string Signature of the agent in HTML format
updated_at datetime Agent updated timestamp

domainName-This API returns the domain name of the current account. Freshservice v2 APIs do not support custom CNAMEs. Hence to make API calls, it is highly recommended to use this method to obtain the Freshservice domain name.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("domainName").then ( function(data) { // success operation // "data" is {"domainName":"sample.freshservice.com"} }, function(error) { // failure operation } );
Attribute Type Description
domainName string Domain of the company. Email addresses of the contacts that contain this domain will be associated with that company automatically.
Ticket Details Page

The following objects can be retrieved using the data API:

ticket-This API returns the ticket object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("ticket").then ( function(data) { // success output // data is {ticket: {"subject": "What’s wrong with ..",..}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ "ticket":{ "account_id": 1, "category": null, "cc_email":{ "cc_emails": "[]", "fwd_emails": "[]", "reply_cc": "[]", "tkt_cc": "[]" }, "created_at": "2017-10-26T19:40:18+05:30", "deleted": false, "department_id_value": null, "display_id": 1, "due_by": "2017-10-31T17:00:00+05:30", "email_config_id": null, "frDueBy": "2017-10-27T17:00:00+05:30", "fr_escalated": false, "group_id": null, "id": 1, "impact": 1, "import_id": null, "isescalated": false, "item_category": null, "notes": [{ "note":{ "created_at": "2017-10-26T19:40:18+05:30", "deleted": false, "id": 1, "incoming": false, "private": true, "source": 4, "updated_at": "2017-10-26T19:40:18+05:30", "user_id": 2, "body": "created_by: 1ntime: 2017-10-26 19:40:18 +0530", "body_html": "<div>created_by: 1<br>time: 2017-10-26 19:40:18 +0530</div>", "attachments": [], "support_email": null } }], "owner_id": null, "priority": 1, "requester_id": 2, "responder_id": null, "source": 2, "spam": false, "status": 2, "sub_category": null, "subject": "What’s wrong with my email?", "ticket_type": "Incident", "to_email": null, "updated_at": "2017-10-26T19:40:18+05:30", "urgency": 1, "description": "Hi Team, I have been unable to send any emails since this morning. What’s going on? Regards, Andrea", "description_html": "<div>Hi Team,<br/> <br/>I have been unable to send any emails since this morning. What’s going on?<br/><br/>Regards,<br/> Andrea </div>", "status_name": "Open", "requester_status_name": "Being Processed", "priority_name": "Low", "source_name": "Portal", "requester_name": "Andrea", "responder_name": "No Agent", "to_emails": null, "department_name": null, "assoc_problem_id": 1, "assoc_change_id": 1, "assoc_change_cause_id": null, "assoc_asset_id": null, "urgency_name": "Low", "impact_name": "Low", "attachments": "[]", "custom_field":{}, "tags": "[]" } }
EXPAND ↓

The following table lists the attributes of the ticket object:

ATTRIBUTE TYPE DESCRIPTION
cc_email object of arrays Email address added in the 'cc' field of the ticket.
department_id number ID of the department to which this ticket belongs
created_at datetime Ticket creation timestamp
custom_field object Key value pairs containing the names and values of custom fields.
description_html string HTML content of the ticket
description string Content of the ticket in plain text
due_by datetime Timestamp that denotes when the ticket is due to be resolved
email_config_id number ID of email config which is used for this ticket.
frDueBy datetime Timestamp that denotes when the first response is due
fr_escalated boolean Set to true if the ticket has been escalated as the result of the first response time being breached
group_id number ID of the group to which the ticket has been assigned
id number Unique ID of the ticket
isescalated boolean Set to true if the ticket has been escalated for any reason
priority number Ticket priority value
priority_name string Ticket priority text
requester_id number User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
responder_id number ID of the agent to whom the ticket has been assigned.
source number The channel through which the ticket was created. This field contains the source value.
source_name string This field contains the source text.
spam boolean Set to true if the ticket has been marked as spam
status number Ticket status value
status_name string Ticket status text
subject string Subject of the ticket
tags array of strings Tags that have been associated with the ticket
ticket_type string Helps categorize the ticket according to the different kinds of issues your support team deals with.
updated_at datetime Ticket updated timestamp

Every ticket uses certain fixed numerical values to denote its source, status, and priority. These numerical values along with their meanings are given below.

Source Value
Email 1
Portal 2
Phone 3
Chat 4
Feedback Widget 5
Yammer 6
AWS CloudWatch 7
Pagerduty 8
Walk-up 9
Slack 10
Status Value
Open 2
Pending 3
Resolved 4
Closed 5
Priority Value
Low 1
Medium 2
High 3
Urgent 4

The following table lists the attributes of the attachments object:

ATTRIBUTE TYPE DESCRIPTION
attachment_url string URL of the attachment
content_content_type string Information on the type of the attachment, for example - image/png, text, zip, and so on
created_at datetime Attachment file creation timestamp
id number Unique ID of the attachment
content_file_name string Attachment file name
content_file_size number Attached file size
updated_at datetime Attachment updated timestamp


requester-This API returns the contact/requester information object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data is {requester: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ "requester":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:17+05:30", "deleted": false, "description": null, "email": "andrea@freshservice.com", "external_id": null, "helpdesk_agent": false, "id": 2, "job_title": "Manager", "language": "en", "mobile": null, "name": "Andrea", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:17+05:30", "department_names": "", "location_name": null, "custom_field":{} } }
EXPAND ↓

The following table lists the attributes of the requester/contact object:

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to true if the contact has been verified
address string Address of the contact
created_at datetime Contact creation timestamp
custom_field dictionary Key value pair containing the name and value of the custom fields.
deleted boolean Set to true if the contact has been deleted
description string A short description of the contact
email string Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
external_id number ID of the contact in an external system
helpdesk_agent boolean Is the contact an agent or not?
id number ID of the contact
job_title string Job title of the contact
language string Language of the contact
mobile number Mobile number of the contact
name string Name of the contact
phone number Telephone number of the contact
time_zone string Time zone in which the contact resides
updated_at datetime Contact updated timestamp

agent-This API returns the information object of the assigned agent

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("agent").then ( function(data) { // success output // data is {agent: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ "agent":{ "active_since": null, "available": true, "created_at": "2017-10-26T19:40:13+05:30", "id": 1, "occasional": false, "points": null, "scoreboard_level_id": null, "signature": null, "signature_html": null, "ticket_permission": 1, "updated_at": "2017-10-26T19:40:13+05:30", "user_id": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30" } } }
EXPAND ↓

The following table lists the attributes of the agent object:

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to true if the contact has been verified
address string Address of the contact
created_at datetime Contact creation timestamp
deleted boolean Set to true if the contact has been deleted
description string A short description of the contact
email string Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
external_id number ID of the contact in an external system
helpdesk_agent boolean Is the contact an agent or not?
id number ID of the contact
job_title string Job title of the contact
language string Language of the contact
mobile number Mobile number of the contact
name string Name of the contact
phone number Telephone number of the contact
time_zone string Time zone in which the contact resides
updated_at datetime Contact updated timestamp

department-This API returns the department information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("department").then ( function(data) { // success output // data is {department: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ "department":{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Support Team", "head_id": null, "id": 3, "name": "Customer Support", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "head_name": null, "prime_user_name": null, "custom_field":{} } }
EXPAND ↓

The following table lists the attributes of the deparment object:

ATTRIBUTE TYPE DESCRIPTION
created_at datetime Department created timestamp
custom_field object Key value pairs containing the names and values of custom fields
description string A short description of the Department
id number Unique ID of the Department
name string Name of the Department
updated_at datetime Department updated timestamp

group-This API returns the group information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("group").then ( function(data) { // success output // data is {group: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
{ "group":{ "id": 9, "name": "Capacity Management Team", "agent_ids": "[]" } }

The following table lists the attributes of the group object:

ATTRIBUTE TYPE DESCRIPTION
agent_ids array of numbers Array of agent user IDs separated by commas.
id number Unique ID of the group
name string Name of the group

associatedProblem-This API returns the associated problem information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedProblem").then ( function(data) { // success output // data is {associatedProblem: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "associatedProblem":{ "category": null, "created_at": "2017-12-07T16:37:41+05:30", "due_by": "2017-12-21T16:37:40+05:30", "group_id": null, "impact": 1, "item_category": null, "known_error": false, "owner_id": null, "priority": 1, "requester_id": 4, "status": 1, "sub_category": null, "subject": "Unable to reach email server", "updated_at": "2017-12-07T16:37:41+05:30", "id": 1 } }
EXPAND ↓

The following table lists the attributes of the problem object:

ATTRIBUTE TYPE DESCRIPTION
category string Problem category
created_at datetime problem creation timestamp
due_by datetime Timestamp that denotes when the problem is due to be resolved
group_id number Id of Group to which the problem is assigned
impact number Impact of the problem
item_category string Problem item category
known_error boolean Set to true if the problem is a known error
owner_id number Id of the agent to whom the problem is assigned
priority number Priority of the problem
requester_id number User-id of the requester
status number Status of the problem
sub_category string Problem sub category
subject string Problem subject
updated_at datetime Problem updated timestamp
id number unique ID of the problem

associatedChange-This API returns the associated change information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedChange").then ( function(data) { // success output // data is {associatedChange: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ "associatedChange":{ "approval_status": 4, "category": null, "change_type": 1, "created_at": "2017-12-07T16:37:40+05:30", "group_id": null, "impact": 1, "item_category": null, "owner_id": null, "planned_end_date": "2017-12-21T16:37:40+05:30", "planned_start_date": "2017-12-21T16:37:40+05:30", "priority": 1, "requester_id": 4, "risk": 1, "status": 1, "sub_category": null, "subject": "Getting ES3 back up to speed", "updated_at": "2017-12-07T16:37:40+05:30", "id": 1 } }
EXPAND ↓

The following table lists the attributes of the change object:

ATTRIBUTE TYPE DESCRIPTION
approval_status number Approval status of the change
category string Change category
change_type number type of the change
created_at datetime change creation timestamp
group_id number Id of Group to which the change is assigned
impact number Impact of the change
item_category string Change item category
owner_id number Id of the agent to whom the change is assigned
planned_end_date datetime Planned End date
planned_start_date datetime Planned Start date
priority number Priority of the change
requester_id number User-id of the requester
risk number Risk of the change
status number Status of the change
sub_category string Change sub category
subject string change subject
updated_at datetime change updated timestamp
id number unique ID of the change

associatedTasks-This API returns the associated tasks information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedTasks").then ( function(data) { // success output // data is {associatedTasks: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ "associatedTasks":[{ "closed_at": null, "created_at": "2017-12-14T12:29:26+05:30", "deleted": false, "description": "", "due_date": "2017-12-15T17:00:00+05:30", "group_id": null, "owner_id": 1, "status": 1, "title": "Sample Task", "updated_at": "2017-12-14T12:29:26+05:30", "user_id": 1, "id": 22 }] }
EXPAND ↓

The following table lists the attributes of the task object:

ATTRIBUTE TYPE DESCRIPTION
closed_at datetime task closed timestamp
created_at datetime task creation timestamp
deleted boolean set to true if the task is deleted
description string description of the task
due_date datetime Due date of the task
group_id number id of the group assigned to the task
owner_id number user_id of the assigned agent

recentChildTickets-This API returns the associated tasks information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("recentChildTickets").then ( function(data) { // success output // data is {recentChildTickets: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ "recentChildTickets":[{ "category": null, "cc_email":{ "cc_emails": [], "fwd_emails": [], "reply_cc": [], "tkt_cc": [] }, "created_at": "2017-12-14T13:17:46+05:30", "deleted": false, "due_by": "2017-12-19T13:17:46+05:30", "frDueBy": "2017-12-15T13:17:46+05:30", "fr_escalated": false, "group_id": null, "isescalated": false, "item_category": null, "owner_id": null, "priority": 1, "requester_id": 2, "responder_id": null, "source": 2, "status": 2, "sub_category": null, "subject": "Sample Child Ticket", "ticket_type": "Incident", "updated_at": "2017-12-14T13:17:46+05:30", "id": 10 }] }
EXPAND ↓

The following table lists the attributes of the task object:

ATTRIBUTE TYPE DESCRIPTION
category string Ticket category
cc_email array of strings Email address added in the 'cc' field of the incoming ticket email
created_at datetime ticket creation timestamp
deleted boolean Set as true if the ticket is deleted/trashed. Deleted tickets will not be considered in any views except "deleted" filter
due_by datetime Ticket due-by time
due_by datetime Ticket due-by time
group_id number Id of Group to which the ticket is assigned
isescalated boolean Set to true if an escalation was sent
item_category string Ticket item category
responder_id number ID of the agent to whom the ticket is assigned
priority number Priority of the ticket
requester_id number User-id of the requester
source number The channel through which the ticket was created
status number Status of the ticket
sub_category string Ticket sub category
subject string Ticket subject
ticket_type number Type property field as defined in ticket fields
updated_at datetime ticket updated timestamp
id number unique ID of the ticket

requesterassets-This API returns the ticket requester associated assets information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requesterAssets").then ( function(data) { // success output // data is {requesterAssets: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
{ "requesterAssets":[{ "agent_id": null, "created_at": "2017-12-07T16:37:44+05:30", "impact": 2, "name": "Andrea's Laptop", "updated_at": "2017-12-07T16:37:44+05:30", "user_id": 2, "id": 1 }] }
EXPAND ↓

ticketassets-This API returns the ticket associated assets information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("ticketAssets").then ( function(data) { // success output // data is {ticketAssets: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
{ "ticketAssets":[{ "agent_id": null, "created_at": "2017-12-07T16:37:44+05:30", "impact": 2, "name": "Andrea's Laptop", "updated_at": "2017-12-07T16:37:44+05:30", "user_id": 2, "id": 1 }] }
EXPAND ↓

The following table lists the attributes of the asset object:

ATTRIBUTE TYPE DESCRIPTION
agent_id number Id of the associated agent
created_at datetime asset creation timestamp
impact number Impact of the item
name string Name of the item
updated_at datetime asset updated timestamp
user_id number Id of the item_user
id number Unique id of the item

Contact Details Page

The following objects can be retrieved using the data API:

requester()-This API returns the requester information object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data: {requester: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ "requester":{ "user":{ "active": false, "address": null, "created_at": "2017-10-26T19:40:17+05:30", "deleted": false, "description": null, "email": "andrea@freshservice.com", "external_id": null, "helpdesk_agent": false, "id": 2, "job_title": "Manager", "language": "en", "mobile": null, "name": "Andrea", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:17+05:30", "custom_field":{} } } }
EXPAND ↓

The following table lists the attributes of the contact object:

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to true if the contact has been verified
address string Address of the contact
created_at datetime Contact creation timestamp
custom_field object Key value pair containing the name and value of the custom fields.
description string A short description of the contact
email string Primary email address of the contact.
id number ID of the contact
job_title string Job title of the contact
language string Language of the contact
mobile string Mobile number of the contact
name string Name of the contact
phone string Telephone number of the contact
time_zone string Time zone in which the contact resides
updated_at datetime Contact updated timestamp

department()-This API returns the department information object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("department").then ( function(data) { // success output // data: {department: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ "department":{ "departments": [{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Support Team", "head_id": null, "id": 3, "name": "Customer Support", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "custom_field":{}, "head_name": null, "prime_user_name": null },{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Development Team", "head_id": null, "id": 1, "name": "Development", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "custom_field":{}, "head_name": null, "prime_user_name": null }] } }
EXPAND ↓

The following table lists the attributes of the department object:

ATTRIBUTE TYPE DESCRIPTION
id number Unique ID of the Department
name string Name of the Department

Change Details Page

The following objects can be retrieved using the data API:

change-This API returns the change object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("change").then ( function(data) { // success output // data is {change: {"subject": "Getting ES3 back..",..}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ "change":{ "itil_change":{ "approval_status": 4, "approval_type": null, "category": null, "cc_email":{}, "change_type": 1, "created_at": "2017-10-26T19:40:34+05:30", "deleted": false, "department_id": null, "display_id": 1, "email_config_id": null, "group_id": null, "id": 1, "impact": 1, "import_id": null, "item_category": null, "owner_id": null, "planned_end_date": "2017-11-09T19:40:34+05:30", "planned_start_date": "2017-11-09T19:40:34+05:30", "priority": 1, "project_id": null, "requester_id": 4, "risk": 1, "status": 1, "sub_category": null, "subject": "Getting ES3 back up to speed", "updated_at": "2017-10-26T19:40:34+05:30", "status_name": "Open", "impact_name": "Low", "priority_name": "Low", "requester_name": "Rachel", "owner_name": null, "group_name": null, "risk_type": "Low", "change_type_name": "Minor", "approval_status_name": "Not Requested", "description": null, "assoc_release_id": 1, "attachments": "[]", "notes": "[]", "custom_field_values":{} } } }
EXPAND ↓

The following table lists the attributes of the change object:

ATTRIBUTE TYPE DESCRIPTION
attachments array of objects Change attachments
cc_email object of arrays Email address added in the 'cc' field of the change.
department_id number ID of the department to which this change belongs
created_at datetime Change creation timestamp
custom_field object Key value pairs containing the names and values of custom fields.
description string Content of the change in plain text
email_config_id number ID of email config which is used for this change.
group_id number ID of the group to which the change has been assigned
id number Unique ID of the change
priority number Change priority value
priority_name string Change priority text
requester_id number User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
owner_id number ID of the agent to whom the change has been assigned.
status number Change status value
status_name string Change status text
subject string Subject of the Change
change_type string Helps categorize the change according to the different kinds of issues your support team deals with.
updated_at datetime Change updated timestamp

Every Change uses certain fixed numerical values to denote its status, and priority. These numerical values along with their meanings are given below.

Status Value
Open 1
Planning 2
Awaiting Approval 3
Pending Release 4
Pending Review 5
Closed 6
Priority Value
Low 1
Medium 2
High 3
Urgent 4

The following table lists the attributes of the attachments object:

ATTRIBUTE TYPE DESCRIPTION
attachment_url string URL of the attachment
content_content_type string Information on the type of the attachment, for example - image/png, text, zip, and so on
created_at datetime Attachment file creation timestamp
id number Unique ID of the attachment
content_file_name string Attachment file name
content_file_size number Attached file size
updated_at datetime Attachment updated timestamp


requester-This API returns the requester information object:

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data is {requester: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ "requester":{ "user":{ "active": false, "address": null, "created_at": "2017-10-26T19:40:22+05:30", "deleted": true, "description": null, "email": "rachel@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 4, "job_title": null, "language": "en", "mobile": null, "name": "Rachel", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:22+05:30", "department_names": "", "location_name": null } } }
EXPAND ↓

The following table lists the attributes of the requester object:

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to true if the contact has been verified
address string Address of the contact
created_at datetime Contact creation timestamp
custom_field dictionary Key value pair containing the name and value of the custom fields.
deleted boolean Set to true if the contact has been deleted
description string A short description of the contact
email string Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
external_id number ID of the contact in an external system
helpdesk_agent boolean Is the contact an agent or not?
id number ID of the contact
job_title string Job title of the contact
language string Language of the contact
mobile number Mobile number of the contact
name string Name of the contact
phone number Telephone number of the contact
time_zone string Time zone in which the contact resides
updated_at datetime Contact updated timestamp

agent-This API returns the information object of the assigned agent

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("agent").then ( function(data) { // success output // data is {agent: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ "agent":{ "active_since": null, "available": true, "created_at": "2017-10-26T19:40:13+05:30", "id": 1, "occasional": false, "points": null, "scoreboard_level_id": null, "signature": null, "signature_html": null, "ticket_permission": 1, "updated_at": "2017-10-26T19:40:13+05:30", "user_id": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30" } } }
EXPAND ↓

The following table lists the attributes of the agent object:

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to true if the contact has been verified
address string Address of the contact
created_at datetime Contact creation timestamp
deleted boolean Set to true if the contact has been deleted
description string A short description of the contact
email string Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
external_id number ID of the contact in an external system
helpdesk_agent boolean Is the contact an agent or not?
id number ID of the contact
job_title string Job title of the contact
language string Language of the contact
mobile number Mobile number of the contact
name string Name of the contact
phone number Telephone number of the contact
time_zone string Time zone in which the contact resides
updated_at datetime Contact updated timestamp

group-This API returns the group information object

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("group").then ( function(data) { // success output // data is {group: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
{ "group":{ "id": 9, "name": "Capacity Management Team", "agent_ids": "[]" } }

The following table lists the attributes of the group object:

ATTRIBUTE TYPE DESCRIPTION
agent_ids array of numbers Array of agent user IDs separated by commas.
id number Unique ID of the group
name string Name of the group

Log in with your Freshservice account

Enter your helpdesk URL to proceed to login

Proceed

By clicking "Proceed", you agree to our Terms of Use.