Mojo Helpdesk (www.MojoHelpdesk.com) is a ticket tracking service developed by Metadot. This document describes its public API v2. API v1 is deprecated.
Mojo Helpdesk API is easy to use. Mojo Helpdesk API allows
3rd party developers to build web, desktop, and server applications or simple
scripts that can communicate directly with the Mojo Helpdesk service.
The communication is done by using RESTful
HTTP
requests in JSON format.
XML is not supported.
A Mojo Helpdesk example API usage Python script is available here.
In the code below, replace access_key
parameter with your access key
(it can be found in your profile).
The Mojo Helpdesk API requires an access key that is found in the Mojo Helpdesk user profile.
curl https://app.mojohelpdesk.com/api/v2/tickets?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List of tickets API call supports paging, with optional parameters
per_page
and page
parameters. per_page
default value is 30, the maximum - 100:
curl https://app.mojohelpdesk.com/api/v2/tickets?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&per_page=20\&page=3
Sorting parameters:
- sort_by - id, title, description, user_id, assigned_to_id, status_id, ticket_form_id, priority_id, ticket_queue_id, company_id, rating, rated_on, created_on, updated_on, status_changed_on, solved_on, assigned_on, ticket_type_id, due_on, scheduled_on
- sort_order - asc, desc
Default sorting is by 'id', descending.
curl https://app.mojohelpdesk.com/api/v2/tickets/88?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"title":"Test ticket","description":"Testing API for ticket creation","ticket_queue_id":"8","priority_id":"30"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"title":"Test ticket","description":"Testing API for ticket creation","ticket_queue_id":"8","priority_id":"30", "user":{"email":"[email protected]"}}'
- suppress_user_notification - Boolean when set to
true
will not send any email to notify for the ticket creation
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/113?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"title":"Test ticket API"}'
curl https://app.mojohelpdesk.com/api/v2/tickets/113/events?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/113/add_tag?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"tag_label":"Test"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/113/remove_tag?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"tag_label":"Test"}'
curl https://app.mojohelpdesk.com/api/v2/tickets/113?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- title - String
- description - String
- ticket_queue_id - Integer
- priority_id - Integer
- 10 emergency
- 20 urgent
- 30 normal
- 40 low
- status_id - Integer
- 10 new
- 20 in progress
- 30 on hold
- 40 information requested
- 50 solved
- 60 closed
- ticket_type_id - Integer
- assigned_to_id - Integer
- ticket_form_id - Integer (if omitted, the default form would be used)
- custom_field_XXX - String (where XXX is the name of the custom field, i.e. custom_field_my_awesome_field)
- user_id - Integer
- cc - String
curl https://app.mojohelpdesk.com/api/v2/tickets/114/comments?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/88/comments?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"body":"New comment"}'
- body - String
- is_private - Boolean
- time_spent - Integer
- cc - String
- suppress_user_notification - Boolean
curl https://app.mojohelpdesk.com/api/v2/tickets/114/staff_notes?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/88/staff_notes?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"body":"New staff note"}'
- body - String
- cc - String
- time_spent - Integer
curl https://app.mojohelpdesk.com/api/v2/tickets/211402/attachments?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -F "file=@/home/user/my-file.txt" https://app.mojohelpdesk.com/api/v2/tickets/211402/attachments?staff_only=true\&access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST
Additional url params:
staff_only
- true/false
curl https://app.mojohelpdesk.com/api/v2/attachments/6422878?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/attachments/6422878?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
The last part of the urls is the search query - the format is the same as the
one generated for the advanced search on the web interface. Note the usage of
%20
instead of space, \&
instead of just &
, \(
instead of (
, \<
instead of <
.
Additional url params:
sf
- sort field name (same as the web form search, i.e. priority_id)r
- 0/1 - reverse sortper_page
- results per page (default 10, min 10)page
- page number (default 1)
curl https://app.mojohelpdesk.com/api/v2/tickets/search?query=status.id:\(\<50\)\&sf=created_on\&r=0\&access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/tickets/search?query=priority.id:\(\<=20\)%20AND%20status.id:\(\<50\)&sf=created_on\&r=0\&access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/tickets/search?query=queue.id:19647%20AND%20status.id:\(\<50\)\&sf=created_on\&r=0\&access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/tickets/search?query=_exists_:due_on\&sf=created_on\&r=0\&access_key=9c9745101d12aed4d5a67d43747824451f9251d4
- assignee.id
- assignee.name
- assignee.email
- comments.id
- comments.body
- comments.created_on
- comments.time_spent
- comments.user.id
- comments.user.name
- comments.user.email
- company.id
- company.name
- created_by.id
- created_by.name
- created_by.email
- created_on
- custom_fields
- description
- due_on
- priority.id
- priority.name
- queue.id
- queue.name
- rating
- rated_on
- scheduled_on
- solved_on
- status.id
- status.name
- status_changed_on
- type.id
- type.name
- title
- updated_on
- Format of all date fields is: 2013-11-11T21:37:02Z
- To search for range of date/time (i.e. for created_on field):
- created_on:[2013-11-11T21:37:02Z TO *] (for dates after the given)
- created_on:[* TO 2013-11-11T21:37:02Z] (for dates before the given)
- created_on:[2013-10-11T21:37:02Z TO 2013-11-11T21:37:02Z] (for dates between the given)
- Surround all string values with parentheses and double quotes like the following examples:
- created_by.email:("[email protected]")
- company.name:("My Company, Ltd")
- comments.user.email:("[email protected]")
curl https://app.mojohelpdesk.com/api/v2/ticket_queues?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List of ticket queues supports paging, with optional parameters per_page and page parameters. If per_page is missing, by default it will return 30 items per page
curl https://app.mojohelpdesk.com/api/v2/ticket_queues?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&per_page=10\&page=2
curl https://app.mojohelpdesk.com/api/v2/ticket_queues/8?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/ticket_queues?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"name":"My queue"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/ticket_queues/11?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"name":"My precious queue"}'
curl https://app.mojohelpdesk.com/api/v2/ticket_queues/10?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- name
- email_alias
- email_forward
curl https://app.mojohelpdesk.com/api/v2/groups?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List of groups supports paging, with optional parameters per_page and page parameters. If per_page is missing, by default it will return 30 items per page
curl https://app.mojohelpdesk.com/api/v2/groups?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&per_page=10\&page=2
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/groups?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"name":"My very own group"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/groups/1999?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"website-url":"www.google.com"}'
curl https://app.mojohelpdesk.com/api/v2/groups/1999?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- name
- primary_contact_id (ID of existing helpdesk user)
- billing_contact_id (ID of existing helpdesk user)
- support_level_id
- support_status_id (0 - active, 1 - delinquent)
- support_start_date
- support_end_date
- support_info_url
- address
- address2
- city
- state
- zip
- country
- website_url
- notes
curl https://app.mojohelpdesk.com/api/v2/users?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/users/techs?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List of users supports paging, with optional parameters per_page and page parameters. If per_page is missing, by default it will return 30 items per page
curl https://app.mojohelpdesk.com/api/v2/users?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&per_page=10\&page=2
curl https://app.mojohelpdesk.com/api/v2/users/1?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/users/[email protected]&access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/users?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&send_welcome_email=1 -X POST -d '{"email":"[email protected]","first_name":"Ivaylo","last_name":"Georgiev","company_id":"888","password":"111111"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/users/1999?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"user_notes":"Thats me again."}'
curl https://app.mojohelpdesk.com/api/v2/users/1999?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- first_name
- last_name
- work_phone
- cell_phone
- home_phone
- user_notes
- company_id
- password
- is_active
- role_id
- 10 - regular user
- 15 - restricted technician
- 20 - technician
- 30 - manager
- 35 - admin
- 40 - owner
curl https://app.mojohelpdesk.com/api/v2/tags?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List of tags supports paging, with optional parameters per_page and page parameters. If per_page is missing, by default it will return 30 items per page
curl https://app.mojohelpdesk.com/api/v2/tags?access_key=9c9745101d12aed4d5a67d43747824451f9251d4\&per_page=10\&page=2
curl https://app.mojohelpdesk.com/api/v2/tags/8?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tags?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"label":"Test","color":"#777777"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tags/11?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"color":"#ff0000"}'
curl https://app.mojohelpdesk.com/api/v2/tags/10?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- label
- color
curl https://app.mojohelpdesk.com/api/v2/tickets/88/tasks?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/88/tasks?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"title":"Test"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/tickets/88/tasks/777?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"notes":"Help"}'
curl https://app.mojohelpdesk.com/api/v2/tickets/88/tasks/777?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- title
- notes
- is_completed
curl https://app.mojohelpdesk.com/api/v2/access_rights/restricted_agents?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/access_rights/groups?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/users/1819458/access_rights?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/groups/124147/access_rights?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/users/1819458/access_rights?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"ticket_queue_id":"94748","has_access":"true"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/users/1819458/access_rights/set?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"keys":["94748","15"],"has_access":"true"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/groups/124147/access_rights?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"ticket_queue_id":"94748","has_access":"true"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/groups/124147/access_rights?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"has_access_to_all_ticket_queues":"true"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/groups/124147/access_rights/set?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"keys":["94748","15"],"has_access":"true"}'
curl https://app.mojohelpdesk.com/api/v2/ticket_forms?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
List all forms with some basic information for them.
curl https://app.mojohelpdesk.com/api/v2/ticket_forms/2700?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
Returns all relevant information for a form, including the list of field attributes, and field rules.
curl https://app.mojohelpdesk.com/api/v2/users/14/group_access?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/users/14/group_access/1234?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/users/14/group_access/1234?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"access":"1"}'
Possible access values:
- 0 - no access
- 1 - full access
- 2 - comment only
curl https://app.mojohelpdesk.com/api/v2/ticket_types?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl https://app.mojohelpdesk.com/api/v2/ticket_type/8?access_key=9c9745101d12aed4d5a67d43747824451f9251d4
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/ticket_types?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X POST -d '{"name":"My type"}'
curl -H 'Content-type: application/json' https://app.mojohelpdesk.com/api/v2/ticket_types/11?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X PUT -d '{"name":"My precious type"}'
curl https://app.mojohelpdesk.com/api/v2/ticket_types/10?access_key=9c9745101d12aed4d5a67d43747824451f9251d4 -X DELETE
- name