SupportPal API Documentation
Core ¶
Brand ¶
Brands are a single customer facing identity, many brands can operate under a single help desk.
Show all of the records.GET/api/core/brand
Example URI
- enabled
boolean
(optional)If the brand is enabled.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "MyCompany2",
"enabled": 1,
"system_url": "http://support.mycompany2.com/",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany2.com",
"global_email_header": "",
"global_email_footer": "",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": 0,
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1476785455,
"updated_at": 1477050455
}
]
}
Display the specified resource.GET/api/core/brand/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "MyCompany2",
"enabled": 1,
"system_url": "http://support.mycompany2.com/",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany2.com",
"global_email_header": "",
"global_email_footer": "",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": 0,
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1476785455,
"updated_at": 1477050455
}
}
IP Ban ¶
Banned IPs that are not allowed to login to either the frontend, operator panel or API (or some combination). Includes manually added bans as well as automatic bans as a result of a number of incorrect logins.
Show all of the records.GET/api/core/ipban
Example URI
- ip
string
(optional)Search with an exact IP address.
- type
boolean
(optional)Search for bans that are permanent (1) or temporary (0).
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"ip": "192.168.1.2",
"reason": "Abuse",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"type": 1,
"expiry": null,
"created_at": 1446383939,
"updated_at": 1446383939
}
]
}
Display the specified resource.GET/api/core/ipban/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"ip": "192.168.1.2",
"reason": "Abuse",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"type": 1,
"expiry": null,
"created_at": 1446383939,
"updated_at": 1446383939
}
}
Store a newly created resource in storage.POST/api/core/ipban
Example URI
- ip
string
(required)The IP address being banned.
- reason
string
(optional)A reason for the IP ban.
- type
boolean
(required)If the ban is permanent (1) or temporary (0).
- event_user
boolean
(optional) Default: 1The ban should not let this IP log in as a user on the frontend.
- event_operator
boolean
(optional) Default: 1The ban should not let this IP log in as an operator.
- event_api
boolean
(optional) Default: 1The ban should not let this IP use the API.
- expiry_time
integer
(optional)A unix timestamp at when the ban should expire, only needed for temporary bans, will default to 24 hours if not entered.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=192.168.1.2&reason=Abuse&type=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new ban!",
"data": {
"id": 1,
"ip": "192.168.1.2",
"reason": "Abuse",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"type": 1,
"expiry": null,
"created_at": 1446383939,
"updated_at": 1446383939
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The ip field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/core/ipban/{id}
Example URI
- id
integer
(required)The ID of the resource.
- ip
string
(optional)The IP address being banned.
- reason
string
(optional)A reason for the IP ban.
- type
boolean
(optional)If the ban is permanent (1) or temporary (0).
- event_user
boolean
(optional)The ban should not let this IP log in as a user on the frontend.
- event_operator
boolean
(optional)The ban should not let this IP log in as an operator.
- event_api
boolean
(optional)The ban should not let this IP use the API.
- expiry_time
integer
(optional)A unix timestamp at when the ban should expire, only needed for temporary bans, will default to 24 hours if not entered.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=192.168.1.2&reason=Abuse&type=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the ban!",
"data": {
"id": 1,
"ip": "192.168.1.2",
"reason": "Abuse",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"type": 1,
"expiry": null,
"created_at": 1446383939,
"updated_at": 1446383939
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The ban with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/core/ipban/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the ban!",
"data": null
}
IP Whitelist ¶
Known IP addresses that will not be banned on failed logins.
Show all of the records.GET/api/core/ipwhitelist
Example URI
- ip
string
(optional)Search with an exact IP address.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"ip": "127.0.0.1",
"description": "Localhost",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"created_at": 1446399514,
"updated_at": 1446399514
}
]
}
Display the specified resource.GET/api/core/ipwhitelist/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"ip": "127.0.0.1",
"description": "Localhost",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"created_at": 1446399514,
"updated_at": 1446399514
}
}
Store a newly created resource in storage.POST/api/core/ipwhitelist
Example URI
- ip
string
(required)The IP address being whitelisted.
- description
string
(optional)A description of the IP being whitelisted.
- event_user
boolean
(optional) Default: 1The whitelisting should apply when logging in as a user on the frontend.
- event_operator
boolean
(optional) Default: 1The whitelisting should apply when logging in as an operator.
- event_api
boolean
(optional) Default: 1The whitelisting should apply when using the API.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=127.0.0.1&description=Localhost
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new whitelisted ip!",
"data": {
"id": 1,
"ip": "127.0.0.1",
"description": "Localhost",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"created_at": 1446399514,
"updated_at": 1446399514
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The ip field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/core/ipwhitelist/{id}
Example URI
- id
integer
(required)The ID of the resource.
- ip
string
(optional)The IP address being whitelisted.
- description
string
(optional)A description of the IP being whitelisted.
- event_user
boolean
(optional)The whitelisting should apply when logging in as a user on the frontend.
- event_operator
boolean
(optional)The whitelisting should apply when logging in as an operator.
- event_api
boolean
(optional)The whitelisting should apply when using the API.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=127.0.0.1&description=Localhost
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the whitelisted ip!",
"data": {
"id": 1,
"ip": "127.0.0.1",
"description": "Localhost",
"event_user": 1,
"event_operator": 1,
"event_api": 1,
"created_at": 1446399514,
"updated_at": 1446399514
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The whitelisted ip with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/core/ipwhitelist/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the whitelisted ip!",
"data": null
}
Language ¶
The installed languages in the system.
Show all of the records.GET/api/core/language
Example URI
- enabled
boolean
(optional)If the language is enabled.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"name": "English",
"code": "en",
"enabled": 0,
"created_at": 1507749920,
"updated_at": 1509574199,
"translations": []
}
]
}
Spam Rules ¶
The rules that are used to determine when incoming tickets and other content are considered spam.
Show all of the records.GET/api/core/spamrule
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"text": "Pills",
"event_message": 1,
"event_comment": 1,
"type": 0,
"created_at": 1446400836,
"updated_at": 1446400836
}
]
}
Display the specified resource.GET/api/core/spamrule/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"text": "Pills",
"event_message": 1,
"event_comment": 1,
"type": 0,
"created_at": 1446400836,
"updated_at": 1446400836
}
}
Store a newly created resource in storage.POST/api/core/spamrule
Example URI
- text
string
(required)The text to check against, can be regex, case-insensitive.
- type
integer
(required)What should be checked, 0 - Content, 1 - Sender, 2 - Content & Sender.
- event_message
boolean
(optional) Default: 1Check against ticket messages.
- event_comment
boolean
(optional) Default: 1Check against article comments.
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=Pills&type=0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new spam rule!",
"data": {
"id": 1,
"text": "Pills",
"event_message": 1,
"event_comment": 1,
"type": 0,
"created_at": 1446400836,
"updated_at": 1446400836
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The text field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/core/spamrule/{id}
Example URI
- id
integer
(required)The ID of the resource.
- text
string
(optional)The text to check against, can be regex, case-insensitive.
- type
integer
(optional)What should be checked, 0 - Content, 1 - Sender, 2 - Content & Sender.
- event_message
boolean
(optional)Check against ticket messages.
- event_comment
boolean
(optional)Check against article comments.
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=Pills&type=0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the spam rule!",
"data": {
"id": 1,
"text": "Pills",
"event_message": 1,
"event_comment": 1,
"type": 0,
"created_at": 1446400836,
"updated_at": 1446400836
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The spam rule with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/core/spamrule/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the spam rule!",
"data": null
}
Settings ¶
Core system settings.
General SettingsGET/api/core/settings
Example URI
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"active_plugins": "",
"admin_folder": "admin",
"date_format": "d/m/Y",
"default_country": "GB",
"default_frontend_language": "en",
"default_operator_language": "en",
"default_email": "email@yourcompany.com",
"default_timezone": "Europe/London",
"enable_ssl": "0",
"force_operator_ssl": "0",
"frontend_language": "1",
"frontend_template": "default",
"is_installed": "1",
"language_frontend_toggle": "1",
"language_operator_toggle": "1",
"maintenance_mode": "0",
"operator_language": "1",
"operator_template": "default",
"simpleauth_key": "g3SMCtWwNoeLTYqMCruFlMXEwjyUVQKj",
"time_format": "g:i A"
}
}
User ¶
User ¶
User accounts.
Show all of the records.GET/api/user/user
Example URI
- search
string
(optional)Search users by their name or email.
- brand_id
integer
(optional)Search for users by the brand they’re registered to.
- firstname
string
(optional)Search for users by their first name.
- lastname
string
(optional)Search for users by their last name.
string
(optional)Search for users by email, will also search additional emails.
- email_verified
boolean
(optional)Search for users that have verified ownership of their email (1) or not (0).
- active
boolean
(optional)Search for users that are active (1) or not (0). Inactive users cannot log in to the frontend.
- organisation_id
integer
(optional)Search for users by their organisation ID.
- organisation_name
string
(optional)Search for users by their organisation name.
- phone
string
(optional)Search for users by their phone number, requires entering an E.164 international format phone number.
- country
integer
(optional)Search for users by their two letter country code like ‘GB’.
- language_code
string
(optional)Search for users by their two letter language code like ‘en’.
- customfield
array
(optional)Search for users by their custom field values, key the array by the custom field ID.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for users created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for users created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for users updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for users updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"brand_id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"groups": [],
"customfields": [],
"phonenumbers": []
}
]
}
Display the specified resource.GET/api/user/user/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"brand_id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"organisation": null,
"additional_emails": [],
"phonenumbers": [],
"customfields": [],
"groups": []
}
}
Store a newly created resource in storage.POST/api/user/user
Example URI
- brand_id
integer
(optional)The brand the user is being registered to, will use the default brand if not entered.
- firstname
string
(optional)The first name of the user.
- lastname
string
(optional)The last name of the user.
string
(required)The user’s email address.
- additional_email
array
(optional)An array of additional email addresses for the user.
- password
string
(optional)The user’s password.
- phone
array
(optional)An array of phone numbers, must be in E.164 international format.
- country
string
(optional)The user’s country, as a two letter string like ‘GB’.
- language_code
string
(optional)The two letter language code, like ‘en’, will default to system default if not entered.
- timezone
string
(optional)The timezone of the user, like ‘Europe/London’, will default to system default if not entered.
- email_verified
boolean
(optional) Default: 0If the user has verified ownership of their email (1) or not, this is usually done by email when a user registers themselves but can also be set manually. Requires a password to be set to 1.
- active
boolean
(optional) Default: 1If the user account is active (1) or not (0). Inactive users cannot log in to the frontend.
- organisation
string
(optional)If creating a new organisation, use this field.
- organisation_id
integer
(optional)If adding to an existing organisation, enter the organisation ID.
- organisation_access_level
boolean
(optional)The access level in the organisation, either Manager (0) or User (1). Defaults to 0 for new organisation, 1 for existing organisation. Only needed with the ‘organisation_id’ field.
- organisation_notifications
boolean
(optional)If user is an organisation manager or owner, should they receive emails on updates for tickets opened by other organisation users.
- customfield
array
(optional)An array of custom fields values, keyed by their ID.
- groups
array
(optional)An array of group IDs that the user belongs to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&password=test1234&email_verified=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new user!",
"data": {
"id": 1,
"brand_id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"organisation": null,
"additional_emails": [],
"phonenumbers": [],
"customfields": [],
"groups": []
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The firstname field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/user/{id}
Example URI
- id
integer
(required)The ID of the resource.
- firstname
string
(optional)The first name of the user.
- lastname
string
(optional)The last name of the user.
string
(optional)The user’s email address.
- additional_email
array
(optional)An array of additional email addresses for the user.
- password
string
(optional)The user’s password.
- phone
array
(optional)An array of phone numbers, must be in E.164 international format.
- country
string
(optional)The user’s country, as a two letter string like ‘GB’.
- language_code
string
(optional)The two letter language code, like ‘en’, will default to system default if not entered.
- timezone
string
(optional)The timezone of the user, like ‘Europe/London’, will default to system default if not entered.
- email_verified
boolean
(optional)If the user has verified ownership of their email (1) or not, this is usually done by email when a user registers themselves but can also be set manually.
- active
boolean
(optional)If the user account is active (1) or not (0). Inactive users cannot log in to the frontend.
- organisation
string
(optional)If creating a new organisation or updating the existing name (the user must be the organisation owner), use this field.
- organisation_id
integer
(optional)The ID of the organisation, use instead of ‘organisation’ if the organisation already exists. If you wish to remove the user from the organisation they are currently associated with, set as 0.
- organisation_access_level
boolean
(optional)The access level in the organisation, either Manager (0) or User (1). Only needed with the ‘organisation_id’ field.
- organisation_notifications
boolean
(optional)If user is an organisation manager or owner, should they receive emails on updates for tickets opened by other organisation users.
- customfield
array
(optional)An array of custom fields values, keyed by their ID.
- groups
array
(optional)An array of group IDs that the user belongs to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&email_verified=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the user!",
"data": {
"id": 1,
"brand_id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"organisation": null,
"additional_emails": [],
"phonenumbers": [],
"customfields": [],
"groups": []
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The user with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/user/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the user!",
"data": null
}
Operator ¶
Staff accounts.
Show all of the records.GET/api/user/operator
Example URI
string
(optional)Search for operators by email.
- active
boolean
(optional)Search for operators that are active (1) or not (0). Inactive operators cannot log in to the operator panel.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for operators created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for operators created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for operators updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for operators updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"phonenumbers": [],
"groups": []
}
]
}
Display the specified resource.GET/api/user/operator/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"phonenumbers": [],
"groups": []
}
}
Store a newly created resource in storage.POST/api/user/operator
Example URI
- firstname
string
(required)The first name of the operator.
- lastname
string
(required)The last name of the operator.
string
(required)The operator’s email address.
- password
string
(required)The operator’s password.
- phone
array
(optional)An array of phone numbers, must be in E.164 international format.
- country
string
(optional)The operator’s country, as a two letter string like ‘GB’.
- language_code
string
(optional)The two letter language code, like ‘en’, will default to system detault if not entered.
- timezone
string
(optional)The timezone of the operator, like ‘Europe/London’, will default to system detault if not entered.
- active
boolean
(optional) Default: 0If the operator is active and can login (1).
- groups
array
(required)An array of group IDs that the operator belongs to. Requires at least one operator group.
- depts
array
(optional)An array of department IDs that the operator belongs to. These are in addition to any departments the operator is assigned to through their groups.
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&active=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new operator!",
"data": {
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"phonenumbers": [],
"groups": []
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/operator/{id}
Example URI
- id
integer
(required)The ID of the resource.
- firstname
string
(optional)The first name of the operator.
- lastname
string
(optional)The last name of the operator.
string
(optional)The operator’s email address.
- password
string
(optional)The operator’s password.
- phone
array
(optional)An array of phone numbers, must be in E.164 international format.
- country
string
(optional)The operator’s country, as a two letter string like ‘GB’.
- language_code
string
(optional)The two letter language code, like ‘en’, will default to system detault if not entered.
- timezone
string
(optional)The timezone of the operator, like ‘Europe/London’, will default to system detault if not entered.
- active
boolean
(optional)If the operator is active and can login (1).
- groups
array
(optional)An array of group IDs that the operator belongs to.
- depts
array
(optional)An array of department IDs that the operator belongs to. These are in addition to any departments the operator is assigned to through their groups.
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&active=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the operator!",
"data": {
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"active": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445611944,
"updated_at": 1445611959,
"formatted_name": "Joe Bloggs",
"phonenumbers": [],
"groups": []
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The operator with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/operator/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the operator!",
"data": null
}
Organisation ¶
Users can be part of organisations, allowing other users to view and reply to their tickets.
Show all of the records.GET/api/user/organisation
Example URI
- search
string
(optional)Search organisations by their name.
- brand_id
integer
(optional)Search for organisations by the brand they’re registered to.
- customfield
array
(optional)Search for organisations by their custom field values, key the array by the custom field ID.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for organisations created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for organisations created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for organisations updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for organisations updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"brand_id": 1,
"owner_id": 1,
"name": "Acme Ltd.",
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"notes": "",
"created_at": 1458660548,
"updated_at": 1474395768,
"users": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 1,
"organisation_access_level": 0,
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
],
"customfields": [
{
"id": 1,
"field_id": 1,
"organisation_id": 1,
"value": "http://www.acmeltd.co.uk",
"created_at": 1474365413,
"updated_at": 1474365413
}
]
}
]
}
Display the specified resource.GET/api/user/organisation/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"brand_id": 1,
"owner_id": 1,
"name": "Acme Ltd.",
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"notes": "",
"created_at": 1458660548,
"updated_at": 1474395768,
"users": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 1,
"organisation_access_level": 0,
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
],
"customfields": [
{
"id": 1,
"field_id": 1,
"organisation_id": 1,
"value": "http://www.acmeltd.co.uk",
"created_at": 1474365413,
"updated_at": 1474365413
}
]
}
}
Store a newly created resource in storage.POST/api/user/organisation
Example URI
- brand_id
integer
(optional)The brand the organisation is being registered to, will use the default brand if not entered. Users in the organisation will need to be from the same brand.
- name
string
(required)The name of the organisation.
- customfield
array
(optional)An array of custom fields values, keyed by their ID.
- country
string
(optional)The country the organisation is based in, as a two letter string like ‘GB’.
- language_code
string
(optional)The organisation’s language, two letter code, like ‘en’, will default to system default if not entered.
- timezone
string
(optional)The organisation’s timezone, like ‘Europe/London’, will default to system default if not entered.
- notes
string
(optional)Any notes about the organisation, for operators only.
- domain
array
(optional)An array of strings that represent the domains belonging to the organisation, for example ’domain.com'. Will be used to automatically add users who register or email the help desk from one of the domains listed.
- access_level
array
(optional)An array of user access levels in organisation, keyed by the user ID. 0 - Manager, 1 - User.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Acme
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new organisation!",
"data": {
"id": 1,
"brand_id": 1,
"owner_id": 1,
"name": "Acme Ltd.",
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"notes": "",
"created_at": 1458660548,
"updated_at": 1474395768,
"users": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 1,
"organisation_access_level": 0,
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
],
"customfields": [
{
"id": 1,
"field_id": 1,
"organisation_id": 1,
"value": "http://www.acmeltd.co.uk",
"created_at": 1474365413,
"updated_at": 1474365413
}
]
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/organisation/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the organisation.
- customfield
array
(optional)An array of custom fields values, keyed by their ID.
- country
string
(optional)The country the organisation is based in, as a two letter string like ‘GB’.
- language_code
string
(optional)The organisation’s language, two letter code, like ‘en’, will default to system default if not entered.
- timezone
string
(optional)The organisation’s timezone, like ‘Europe/London’, will default to system default if not entered.
- notes
string
(optional)Any notes about the organisation, for operators only.
- domain
array
(optional)An array of strings that represent the domains belonging to the organisation, for example ’domain.com'. Will be used to automatically add users who register or email the help desk from one of the domains listed.
- access_level
array
(optional)An array of user access levels in organisation, keyed by the user ID. 0 - Manager, 1 - User.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Acme
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the organisation!",
"data": {
"id": 1,
"brand_id": 1,
"owner_id": 1,
"name": "Acme Ltd.",
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"notes": "",
"created_at": 1458660548,
"updated_at": 1474395768,
"users": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 1,
"organisation_access_level": 0,
"country": "GB",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
],
"customfields": [
{
"id": 1,
"field_id": 1,
"organisation_id": 1,
"value": "http://www.acmeltd.co.uk",
"created_at": 1474365413,
"updated_at": 1474365413
}
]
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The organisation with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/organisation/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the organisation!",
"data": null
}
User Group ¶
Groups to put together similar users.
Show all of the records.GET/api/user/usergroup
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Local",
"description": "Users based within 5 miles.",
"colour": "#35a600",
"administrator": 0,
"created_at": 1445441559,
"updated_at": 1445441559
}
]
}
Display the specified resource.GET/api/user/usergroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Local",
"description": "Users based within 5 miles.",
"colour": "#35a600",
"administrator": 0,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
Store a newly created resource in storage.POST/api/user/usergroup
Example URI
- name
string
(required)The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- colour
string
(optional) Default: #ffffffThe hex colour of the group.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new user group!",
"data": {
"id": 1,
"name": "Local",
"description": "Users based within 5 miles.",
"colour": "#35a600",
"administrator": 0,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.PUT/api/user/usergroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- colour
string
(optional)The hex colour of the group.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the user group!",
"data": {
"id": 1,
"name": "Local",
"description": "Users based within 5 miles.",
"colour": "#35a600",
"administrator": 0,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The user group with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/usergroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the user group!",
"data": null
}
Operator Group ¶
Groups used to split operators and give them different permissions.
Show all of the records.GET/api/user/operatorgroup
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Sales",
"description": "Answering customer pre-sale questions.",
"colour": "#FFFFFF",
"administrator": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
]
}
Display the specified resource.GET/api/user/operatorgroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"0": "Sales",
"id": 1,
"description": "Answering customer pre-sale questions.",
"colour": "#FFFFFF",
"administrator": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
Store a newly created resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.POST/api/user/operatorgroup
Example URI
- name
string
(required)The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- colour
string
(optional) Default: #ffffffThe hex colour of the group.
- roles
array
(required)An array of role IDs that the group belongs to.
- brand
array
(optional)An array of brand IDs that the operator group is assigned to.
- department
array
(optional)An array of department IDs that the operator group is assigned to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Sales
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new operator group!",
"data": {
"id": 1,
"name": "Sales",
"description": "Answering customer pre-sale questions.",
"colour": "#FFFFFF",
"administrator": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/operatorgroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- colour
string
(optional)The hex colour of the group.
- roles
array
(optional)An array of role IDs that the group belongs to.
- brand
array
(optional)An array of brand IDs that the operator group is assigned to.
- department
array
(optional)An array of department IDs that the operator group is assigned to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Sales
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the operator group!",
"data": {
"0": "Sales",
"id": 1,
"description": "Answering customer pre-sale questions.",
"colour": "#FFFFFF",
"administrator": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The operator group with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/operatorgroup/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the operator group!",
"data": null
}
Custom Field ¶
Fields that collect and store information on each user account.
Show all of the records.GET/api/user/customfield
Example URI
- brand_id
integer
(optional)Fetch only the custom fields associated with a given brand.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "VAT Number",
"description": "Please enter your company VAT number if you have one.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
]
}
Display the specified resource.GET/api/user/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "VAT Number",
"description": "Please enter your company VAT number if you have one.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
Store a newly created resource in storage.POST/api/user/customfield
Example URI
- name
string
(required)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(required)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- required
boolean
(optional) Default: 0Whether the custom field is required to submit the form.
- public
boolean
(optional) Default: 1Whether the custom field should be visible to users.
- encrypted
boolean
(optional) Default: 0Whether to encrypt the custom field value in the database.
- locked
boolean
(optional) Default: 0Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=VAT+Number&type=8
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new custom field!",
"data": {
"id": 1,
"name": "VAT Number",
"description": "Please enter your company VAT number if you have one.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(optional)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- required
boolean
(optional)Whether the custom field is required to submit the form.
- public
boolean
(optional)Whether the custom field should be visible to users.
- encrypted
boolean
(optional)Whether to encrypt the custom field value in the database.
- locked
boolean
(optional)Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the custom field!",
"data": {
"id": 1,
"name": "VAT Number",
"description": "Please enter your company VAT number if you have one.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The custom field with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the custom field!",
"data": null
}
Organisation Custom Field ¶
Fields that collect and store information on each user organisation.
Show all of the records.GET/api/user/organisationcustomfield
Example URI
- brand_id
integer
(optional)Fetch only the custom fields associated with a given brand.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Website URL",
"description": "Please enter your website address",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
]
}
Display the specified resource.GET/api/user/organisationcustomfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Website URL",
"description": "Please enter your website address",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
Store a newly created resource in storage.POST/api/user/organisationcustomfield
Example URI
- name
string
(required)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(required)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- required
boolean
(optional) Default: 0Whether the custom field is required to submit the form.
- public
boolean
(optional) Default: 1Whether the custom field should be visible on the frontend.
- encrypted
boolean
(optional) Default: 0Whether to encrypt the custom field value in the database.
- locked
boolean
(optional) Default: 0Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=VAT+Number&type=8
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new custom field!",
"data": {
"id": 1,
"name": "Website URL",
"description": "Please enter your website address",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/user/organisationcustomfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(optional)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- required
boolean
(optional)Whether the custom field is required to submit the form.
- public
boolean
(optional)Whether the custom field should be visible on the frontend.
- encrypted
boolean
(optional)Whether to encrypt the custom field value in the database.
- locked
boolean
(optional)Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the custom field!",
"data": {
"id": 1,
"name": "Website URL",
"description": "Please enter your website address",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"locked": 0,
"created_at": 1446325459,
"updated_at": 1446325459,
"options": []
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The custom field with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/organisationcustomfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the custom field!",
"data": null
}
Role ¶
A set of permissions that apply to operator groups.
Show all of the records.GET/api/user/role
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Administrator",
"slug": "administrator",
"description": "Full permissions",
"created_at": 1445611886,
"updated_at": 1445611886,
"permissions": [
{
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886,
"pivot": {
"role_id": 1,
"permission_id": 1
}
}
]
}
]
}
Display the specified resource.GET/api/user/role/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Administrator",
"slug": "administrator",
"description": "Full permissions",
"created_at": 1445611886,
"updated_at": 1445611886,
"permissions": [
{
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886,
"pivot": {
"role_id": 1,
"permission_id": 1
}
}
]
}
}
Store a newly created resource in storage.POST/api/user/role
Example URI
- name
string
(required)The name of the operator role. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the operator role. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- group
array
(optional)An array of operator group IDs that has the role.
- permission
array
(optional)An array, keyed by permission IDs, with value 1 when the role has that permission.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Administrator&permission[1]=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new role!",
"data": {
"id": 1,
"name": "Administrator",
"slug": "administrator",
"description": "Full permissions",
"created_at": 1445611886,
"updated_at": 1445611886,
"permissions": [
{
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886,
"pivot": {
"role_id": 1,
"permission_id": 1
}
}
]
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.PUT/api/user/role/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the operator role. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the operator role. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- group
array
(optional)An array of operator group IDs that has the role.
- permission
array
(optional)An array, keyed by permission IDs, with value 1 when the role has that permission.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the role!",
"data": {
"id": 1,
"name": "Administrator",
"slug": "administrator",
"description": "Full permissions",
"created_at": 1445611886,
"updated_at": 1445611886,
"permissions": [
{
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886,
"pivot": {
"role_id": 1,
"permission_id": 1
}
}
]
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The role with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/user/role/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the role!",
"data": null
}
Permission ¶
Permissions for operators.
Show all of the records.GET/api/user/permission
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886
}
]
}
Display the specified resource.GET/api/user/permission/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"inherit_id": null,
"module_id": 1,
"name": "apitoken",
"slug": {
"view": true,
"create": true,
"update": true,
"delete": true
},
"description": "apitoken",
"created_at": 1445611886,
"updated_at": 1445611886
}
}
Settings ¶
User system settings.
General SettingsGET/api/user/settings
Example URI
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"ldap_enabled": "0",
"registration_captcha": "1",
"registration_enabled": "1",
"user_name_format": "0"
}
}
Ticket ¶
Ticket ¶
Tickets are individual support requests from users or internal staff.
Show all of the records.GET/api/ticket/ticket
Example URI
- filter
integer
(optional)Filter by a ticket filter, will ignore all of the below filtering options if set.
- filter_operator
integer
(optional)If filtering by a ticket filter, set which operator to run the filter as. Required if the filter is private or limited to certain operator groups.
- search
string
(optional)Search with a term, checks number, subject and messages.
- number
string
(optional)Search by ticket number.
- department
mixed
(optional)Filter by ticket department, accepts a single ID or a comma delimited string e.g. 1,2,3. Parent departments include children department tickets.
- brand
mixed
(optional)Filter by ticket brand, accepts a single ID or a comma delimited string e.g. 1,2,3.
- channel
mixed
(optional)Filter by ticket channel, accepts a single ID or a comma delimited string e.g. 1,2,3.
- status
mixed
(optional)Filter by ticket status, accepts a single ID or a comma delimited string e.g. 1,2,3.
- priority
mixed
(optional)Filter by ticket priority, accepts a single ID or a comma delimited string e.g. 1,2,3.
- tag
mixed
(optional)Fetch tickets with tag(s), accepts a single ID or a comma delimited string e.g. 1,2,3.
- user
mixed
(optional)Filter by submitting user, accepts a single ID or a comma delimited string e.g. 1,2,3.
- user_email
string
(optional)Filter by the user’s email address.
- organisation
mixed
(optional)Filter by organisation, accepts a single ID or a comma delimited string e.g. 1,2,3.
- assigned
mixed
(optional)Filter by assigned operator, accepts a single ID or a comma delimited string e.g. 1,2,3. Use ‘-1’ to find unassigned tickets.
- watching
mixed
(optional)Filter by watching operator, accepts a single ID or a comma delimited string e.g. 1,2,3.
- internal
boolean
(optional)Fetch only internal tickets (1) or non-internal tickets (0).
- customfield
array
(optional)Filter by custom field value, an array keyed by custom field ID with a string or custom field option ID as the value. Performs an equal or contains search depending on the custom field type.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for tickets created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for tickets created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for tickets updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for tickets updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"number": "3189840",
"department_id": 2,
"department_email_id": 1,
"brand_id": 1,
"channel_id": 1,
"user_id": 2,
"status_id": 1,
"priority_id": 1,
"sla_plan_id": null,
"subject": "Test",
"due_time": null,
"resolved_time": null,
"cc": [],
"locked": 0,
"merged": 0,
"internal": 0,
"created_at": 1445962331,
"updated_at": 1445962332,
"deleted_at": null,
"frontend_url": "http://supportpal.test/en/tickets/view/3189840?token=8c13b9225d3f8454e834460354678a1f246f79cd",
"operator_url": "http://supportpal.test/en/admin/ticket/view/1",
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"department": {
"id": 2,
"name": "Test",
"description": "Test",
"order": 2,
"parent": 1,
"public": 0,
"ticket_number_format": null,
"default_assignedto": null,
"notify_email_ticket": 1,
"email_templates": [],
"created_at": 1445960900,
"updated_at": 1445960900
},
"channel": {
"id": 1,
"name": "Web",
"enabled": 1,
"class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
"created_at": 1445611904,
"updated_at": 1445611904
},
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jshah4517@gmail.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
},
"status": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"priority": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"slaplan": null
}
]
}
Display the specified resource.GET/api/ticket/ticket/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"number": "3189840",
"department_id": 2,
"department_email_id": 1,
"brand_id": 1,
"channel_id": 1,
"user_id": 2,
"status_id": 1,
"priority_id": 1,
"sla_plan_id": null,
"subject": "Test",
"due_time": null,
"resolved_time": null,
"cc": [],
"locked": 0,
"merged": 0,
"internal": 0,
"created_at": 1445962331,
"updated_at": 1445962332,
"deleted_at": null,
"frontend_url": "http://supportpal.test/en/tickets/view/3189840?token=8c13b9225d3f8454e834460354678a1f246f79cd",
"operator_url": "http://supportpal.test/en/admin/ticket/view/1",
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"department": {
"id": 2,
"name": "Test",
"description": "Test",
"order": 2,
"parent": 1,
"public": 0,
"ticket_number_format": null,
"default_assignedto": null,
"notify_email_ticket": 1,
"email_templates": [],
"created_at": 1445960900,
"updated_at": 1445960900
},
"channel": {
"id": 1,
"name": "Web",
"enabled": 1,
"class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
"created_at": 1445611904,
"updated_at": 1445611904
},
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
},
"status": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"priority": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"slaplan": null
}
}
Store a newly created resource in storage.POST/api/ticket/ticket
Example URI
- user
integer
(optional)The user opening the ticket, an operator ID is required if opening an internal ticket.
- on_behalf_of
integer
(optional)When opening a ticket as an operator, specify a user ID to open the ticket on behalf of.
- user_firstname
string
(optional)If a new user, set the user’s first name.
- user_lastname
string
(optional)If a new user, set the user’s last name.
- user_email
string
(optional)If a new user, set the user’s email, required if no user ID set. Can be entered instead of the user parameter to find a user by their email address.
- user_organisation
string
(optional)If a new user, set the user’s organisation, will create a new organisation.
- user_ip_address
string
(optional)The user’s IP address.
- department
integer
(required)The department the ticket is being opened in. It must be assigned to the brand that the ticket is being opened in.
- brand
integer
(optional)The brand the ticket is being opened in, defaults to default brand if not entered.
- status
integer
(required)The status of the new ticket.
- priority
integer
(required)The priority of the new ticket.
- internal
boolean
(optional) Default: 0If the ticket is internal (for operators only). If true, requires the user parameter to be set to an operator ID.
- subject
string
(required)The ticket subject.
- text
string
(required)The initial ticket message.
- tag
array
(optional)An array of tag IDs for the new ticket.
- assignedto
array
(optional)An array of operator IDs that are assigned to the new ticket.
- watching
array
(optional)An array of operator IDs that are watching the new ticket.
- customfield
array
(optional)An array of custom fields values, keyed by their ID.
- cc
array
(optional)An array of email addresses to CC on the ticket.
- send_user_email
boolean
(optional) Default: 1Whether to send an email to the user(s) about the new ticket.
- send_operators_email
boolean
(optional) Default: 1Whether to send an email to operators about the new ticket.
- attachment
array
(optional)A multi-dimensional array of attachments in the format of ‘attachment[n][filename]’ (attachment filename) and ‘attachment[n][contents]’ (base64-encoded file contents).
- created_at
integer
(optional)If you wish to set a custom created time, must be a UNIX timestamp.
Headers
Content-Type: application/x-www-form-urlencoded
Body
user=2&department=2&status=1&priority=1&subject=Test&text=Testing+this
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new ticket!",
"data": {
"id": 1,
"number": "3189840",
"department_id": 2,
"department_email_id": 1,
"brand_id": 1,
"channel_id": 1,
"user_id": 2,
"status_id": 1,
"priority_id": 1,
"sla_plan_id": null,
"subject": "Test",
"due_time": null,
"resolved_time": null,
"cc": [],
"locked": 0,
"merged": 0,
"internal": 0,
"created_at": 1445962331,
"updated_at": 1445962332,
"deleted_at": null,
"frontend_url": "http://supportpal.test/en/tickets/view/3189840?token=8c13b9225d3f8454e834460354678a1f246f79cd",
"operator_url": "http://supportpal.test/en/admin/ticket/view/1",
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"department": {
"id": 2,
"name": "Test",
"description": "Test",
"order": 2,
"parent": 1,
"public": 0,
"ticket_number_format": null,
"default_assignedto": null,
"notify_email_ticket": 1,
"email_templates": [],
"created_at": 1445960900,
"updated_at": 1445960900
},
"channel": {
"id": 1,
"name": "Web",
"enabled": 1,
"class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
"created_at": 1445611904,
"updated_at": 1445611904
},
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
},
"status": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"priority": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"slaplan": null
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The department field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/ticket/{id}
Example URI
- id
integer
(required)The ID of the resource.
- brand
integer
(optional)Update the brand on the ticket. Must also have the department and department_email parameters set that is assigned to the new brand.
- user
integer
(optional)Update the user on the ticket.
- department
integer
(optional)Update the department on the ticket. It must be assigned to the brand that the ticket has been opened in.
- department_email
integer
(optional)Update the department email on the ticket, used to send emails notifications for this ticket. It must be assigned to the department and brand that the ticket has been opened in.
- status
integer
(optional)Update the status on the ticket.
- priority
integer
(optional)Update the priority on the ticket.
- subject
string
(optional)Update the subject on the ticket.
- tag
array
(optional)An array of tag IDs for the ticket (overwrites existing tags).
- assignedto
array
(optional)An array of operator IDs that are assigned to the ticket.
- watching
array
(optional)An array of operator IDs that are watching the ticket.
- link
array
(optional)An array of ticket IDs to link the ticket to.
- unlink
array
(optional)An array of ticket IDs to unlink from the ticket.
- sla_plan
integer
(optional)Update the SLA plan on the ticket (will also update due time).
- reply_due_time
integer
(optional)Manually set the reply due time on the ticket, set as a UNIX timestamp.
- resolve_due_time
integer
(optional)Manually set the resolve due time on the ticket, set as a UNIX timestamp.
- customfield
array
(optional)An array of custom fields values, keyed by their ID (overwrites existing custom fields).
- overwrite_customfield_values
boolean
(optional) Default: falseIf updated custom field data is provided, locked custom fields will not be updated unless this field is set to true.
- cc
array
(optional)An array of email addresses to CC on the ticket (overwrites existing CC emails).
- locked
boolean
(optional)If the ticket is locked and the user cannot add any further replies, this also closes the ticket.
Headers
Content-Type: application/x-www-form-urlencoded
Body
department=2
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the ticket!",
"data": {
"id": 1,
"number": "3189840",
"department_id": 2,
"department_email_id": 1,
"brand_id": 1,
"channel_id": 1,
"user_id": 2,
"status_id": 1,
"priority_id": 1,
"sla_plan_id": null,
"subject": "Test",
"due_time": null,
"resolved_time": null,
"cc": [],
"locked": 0,
"merged": 0,
"internal": 0,
"created_at": 1445962331,
"updated_at": 1445962332,
"deleted_at": null,
"frontend_url": "http://supportpal.test/en/tickets/view/3189840?token=8c13b9225d3f8454e834460354678a1f246f79cd",
"operator_url": "http://supportpal.test/en/admin/ticket/view/1",
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"department": {
"id": 2,
"name": "Test",
"description": "Test",
"order": 2,
"parent": 1,
"public": 0,
"ticket_number_format": null,
"default_assignedto": null,
"notify_email_ticket": 1,
"email_templates": [],
"created_at": 1445960900,
"updated_at": 1445960900
},
"channel": {
"id": 1,
"name": "Web",
"enabled": 1,
"class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
"created_at": 1445611904,
"updated_at": 1445611904
},
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
},
"status": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"priority": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"slaplan": null
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "There was an error updating the ticket.",
"data": null
}
Moves the specified resource from storage to trash, can be deleted permanently in the operator interface.DELETE/api/ticket/ticket/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully moved the ticket to trash!",
"data": null
}
Merge tickets.POST/api/ticket/ticket/{id}/merge
Example URI
- id
integer
(required)The ID of the resource.
- ids
array
(required)An array of ticket IDs to merge into the given resource.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ids[]=2&ids[]=3
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the ticket!",
"data": {
"id": 1,
"number": "3189840",
"department_id": 2,
"department_email_id": 1,
"brand_id": 1,
"channel_id": 1,
"user_id": 2,
"status_id": 1,
"priority_id": 1,
"sla_plan_id": null,
"subject": "Test",
"due_time": null,
"resolved_time": null,
"cc": [],
"locked": 0,
"merged": 0,
"internal": 0,
"created_at": 1445962331,
"updated_at": 1445962332,
"deleted_at": null,
"frontend_url": "http://supportpal.test/en/tickets/view/3189840?token=8c13b9225d3f8454e834460354678a1f246f79cd",
"operator_url": "http://supportpal.test/en/admin/ticket/view/1",
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"department": {
"id": 2,
"name": "Test",
"description": "Test",
"order": 2,
"parent": 1,
"public": 0,
"ticket_number_format": null,
"default_assignedto": null,
"notify_email_ticket": 1,
"email_templates": [],
"created_at": 1445960900,
"updated_at": 1445960900
},
"channel": {
"id": 1,
"name": "Web",
"enabled": 1,
"class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
"created_at": 1445611904,
"updated_at": 1445611904
},
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
},
"status": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"priority": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445611902,
"updated_at": 1445611902
},
"slaplan": null
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The selected ids.0 is invalid.",
"data": null
}
Message ¶
Show all of the records.GET/api/ticket/message
Example URI
- ticket_id
integer
(required)Ticket ID to fetch messages for.
- include_draft
boolean
(optional) Default: 0Whether to include drafts.
- by
boolean
(optional)Filter by messages posted by operator (0) or users (1) only.
- type
boolean
(optional)Filter by ticket messages (0) or ticket notes (1) only.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for messages created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for messages created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for messages updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for messages updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 0,
"text": "est",
"is_draft": 0,
"social_id": null,
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
}
]
}
Display the specified resource.GET/api/ticket/message/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 0,
"text": "est",
"is_draft": 0,
"social_id": null,
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
}
}
Store a newly created resource in storage.POST/api/ticket/message
Example URI
- ticket_id
string
(required)The ticket we’re posting to.
- user_id
string
(required)The user we’re posting on behalf of.
- user_ip_address
string
(optional)The user’s IP address.
- message_type
integer
(optional) Default: 0Whether we’re adding a normal message or an operator note (0 or 1).
- text
string
(required)The message text.
- attachment
array
(optional)A multi-dimensional array of attachments in the format of ‘attachment[n][filename]’ (attachment filename) and ‘attachment[n][contents]’ (base64-encoded file contents).
- cc
array
(optional)An array of email addresses to CC on the ticket.
- is_draft
boolean
(optional) Default: 0Whether the message is a draft.
- send_user_email
boolean
(optional) Default: 1If an operator reply, whether to send an email to the user(s). If a user reply, whether to send a notification to CC’ed email addresses.
- send_operators_email
boolean
(optional) Default: 1If a user reply, whether to send a notification to the relevant operators. If an operator reply, whether to also send an email to the operators containing the reply (default 0 in this case).
- created_at
integer
(optional)Unix timestamp for when the message was created.
Headers
Content-Type: application/x-www-form-urlencoded
Body
ticket_id=1&user_id=1&text=Test
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new message!",
"data": {
"id": 1,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 0,
"text": "Test",
"is_draft": 0,
"social_id": null,
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The selected user id is invalid.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/message/{id}
Example URI
- id
integer
(required)The ID of the resource.
- text
string
(required)The replacement text for the message.
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=I've+edited+this+message.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the message!",
"data": {
"id": 1,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 0,
"text": "est",
"is_draft": 0,
"social_id": null,
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": 3,
"organisation_access_level": 0,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "There was an error updating the message.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/message/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the message!",
"data": null
}
Forward ¶
Forward to a third-party from a ticket.POST/api/ticket/forward
Example URI
- ticket_id
string
(required)The ticket we’re forwarding from.
- user_id
string
(required)The user we’re posting on behalf of, must be an operator.
- text
string
(required)The email text.
- from_address
mixed
(optional)The from email address on the forwarded email, enter a department email ID or ‘me’ to set as the operator’s email address. Defaults to the ticket’s department email.
- to_address
array
(optional)An array of email addresses that the forwarded email will be sent to. Required if no CC or BCC emails set.
- cc_address
array
(optional)An array of email addresses that will be CC’ed in the forwarded email. Required if no TO or BCC emails set.
- bcc_address
array
(optional)An array of email addresses that will be BCC’ed in the forwarded email. Required if no TO or CC emails set.
- subject
string
(required)The email subject.
- is_draft
boolean
(optional) Default: 0Whether the message is a draft.
- attachment
array
(optional)A multi-dimensional array of attachments in the format of ‘attachment[n][filename]’ (attachment filename) and ‘attachment[n][contents]’ (base64-encoded file contents).
Headers
Content-Type: application/x-www-form-urlencoded
Body
ticket_id=1&user_id=1&text=This+is+forwarded+to_address[]=supplier@company.com&subject=Please+check+this
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new message!",
"data": {
"id": 2,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 2,
"text": "This is forwarded",
"is_draft": 0,
"social_id": null,
"extra": {
"to_address": [
"supplier@company.com"
],
"cc_address": null,
"bcc_address": null
},
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"role": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"email_verified": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": "US",
"language_code": "en",
"timezone": "Europe/London",
"avatar": null,
"twofa_enabled": 0,
"twofa_secret": null,
"twofa_token": null,
"twitter_id": null,
"twitter_handle": null,
"facebook_id": null,
"created_at": 1445613240,
"updated_at": 1446314521,
"formatted_name": "Joe Bloggs"
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The selected user id is invalid.",
"data": null
}
Attachment ¶
Ticket attachments, each assigned to a specific ticket message.
Show all of the records.GET/api/ticket/attachment
Example URI
- ticket_id
integer
(optional)Only fetch attachments associated with the ticket ID.
- message_id
integer
(optional)Only fetch attachments associated with the ticket message ID.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"ticket_id": 1,
"message_id": 12,
"original_name": "wall3[1].jpg",
"created_at": 1446224250,
"updated_at": 1446224250,
"upload": {
"id": 8,
"hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"filename": "wall3[1].jpg",
"folder": "tickets",
"mime": "image/jpeg",
"size": "367.4 KB",
"created_at": 1446224225,
"updated_at": 1446224225
}
}
]
}
Display the specified resource.GET/api/ticket/attachment/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"ticket_id": 1,
"message_id": 12,
"original_name": "wall3[1].jpg",
"created_at": 1446224250,
"updated_at": 1446224250,
"upload": {
"id": 8,
"hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"filename": "wall3[1].jpg",
"folder": "tickets",
"mime": "image/jpeg",
"size": "367.4 KB",
"created_at": 1446224225,
"updated_at": 1446224225
}
}
}
Download the specified resource. Returns file data.GET/api/ticket/attachment/{id}/download
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Store a newly created resource in storage.POST/api/ticket/attachment
Example URI
- message_id
integer
(required)The ticket message to associate the attachment with.
- filename
string
(required)The name of the file.
- contents
string
(required)The base64-encoded file contents being uploaded.
Headers
Content-Type: application/x-www-form-urlencoded
Body
message_id=1&filename=hello.jpg&contents=MQ==
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new attachment!",
"data": {
"id": 1,
"upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"ticket_id": 1,
"message_id": 12,
"original_name": "wall3[1].jpg",
"created_at": 1446224250,
"updated_at": 1446224250,
"upload": {
"id": 8,
"hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
"filename": "wall3[1].jpg",
"folder": "tickets",
"mime": "image/jpeg",
"size": "367.4 KB",
"created_at": 1446224225,
"updated_at": 1446224225
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The filename field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/attachment/{id}
Example URI
- id
string
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the attachment!",
"data": null
}
Status ¶
Used to identify the current state of a ticket.
Show all of the records.GET/api/ticket/status
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
]
}
Display the specified resource.GET/api/ticket/status/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
Store a newly created resource in storage.POST/api/ticket/status
Example URI
- name
string
(required)The name of the status. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- colour
string
(optional) Default: #ffffffThe colour of the status.
- auto_close
boolean
(optional) Default: 0Whether tickets should be automatically closed.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Open&auto_close=0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new status!",
"data": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/status/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(required)The name of the status. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.
- colour
string
(optional)The colour of the status.
- auto_close
boolean
(optional)Whether tickets should be automatically closed.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Open&colour=#999999
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the status!",
"data": {
"id": 1,
"name": "Open",
"colour": "#35a600",
"auto_close": 1,
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The status with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/status/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the status!",
"data": null
}
Priority ¶
The urgency levels available for tickets.
Show all of the records.GET/api/ticket/priority
Example URI
- department_id
integer
(optional)Fetch only the priorities associated with a given department
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
]
}
Display the specified resource.GET/api/ticket/priority/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
Store a newly created resource in storage.POST/api/ticket/priority
Example URI
- name
string
(required)The name of the priority. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- colour
string
(optional) Default: #ffffffThe colour of the priority.
- depts
array
(optional)List of department IDs.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#666
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new priority!",
"data": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/priority/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the priority. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.
- colour
string
(optional)The colour of the priority.
- depts
array
(optional)List of department IDs.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#999999
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the priority!",
"data": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The priority with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/priority/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the priority!",
"data": null
}
Tag ¶
Tags can be given to tickets, as another way to categorise tickets.
Show all of the records.GET/api/ticket/tag
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
]
}
Display the specified resource.GET/api/ticket/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
Store a newly created resource in storage.POST/api/ticket/tag
Example URI
- name
string
(required)The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- colour
string
(optional) Default: #ddddddThe colour of the tag.
Headers
Content-Type: application/json
Body
{
"name": "Reseller"
}
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new tag!",
"data": {
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(required)The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.
- colour
string
(optional)The colour of the tag.
Headers
Content-Type: application/json
Body
{
"name": "Reseller"
}
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the tag!",
"data": {
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The tag with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the tag!",
"data": null
}
Custom Field ¶
Fields that collect and store information on each ticket.
Show all of the records.GET/api/ticket/customfield
Example URI
- brand_id
integer
(optional)Fetch only the custom fields associated with a given brand.
- department_id
integer
(optional)Fetch only the custom fields associated with a given department.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"count": 1,
"message": null,
"data": [
{
"id": 1,
"name": "IP Address",
"description": "Please enter your server's IP address.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"purge": 0,
"locked": 0,
"created_at": 1446228389,
"updated_at": 1446228389
}
]
}
Display the specified resource.GET/api/ticket/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "IP Address",
"description": "Please enter your server's IP address.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"purge": 0,
"locked": 0,
"created_at": 1446228389,
"updated_at": 1446228389
}
}
Store a newly created resource in storage.POST/api/ticket/customfield
Example URI
- name
string
(required)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(required)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- depts
array
(optional)List of department IDs.
- required
boolean
(optional) Default: 0Whether the custom field is required to submit the form.
- public
boolean
(optional) Default: 1Whether the custom field should be visible to users.
- encrypted
boolean
(optional) Default: 0Whether to encrypt the custom field value in the database.
- purge
boolean
(optional) Default: 0Whether to purge the custom field.
- locked
boolean
(optional) Default: 0Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=IP Address&type=1&required=1&public=1&encrypted=0&purge=0&locked=0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new custom field!",
"data": {
"id": 1,
"name": "IP Address",
"description": "Please enter your server's IP address.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"purge": 0,
"locked": 0,
"created_at": 1446228389,
"updated_at": 1446228389
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/ticket/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- description
string
(optional)A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- type
integer
(optional)The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.
- depends_on_field_id
integer
(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer
(optional)Custom field option ID that this field depends on.
- brand
array
(optional)An array of brand IDs that the field is available in.
- depts
array
(optional)An array of department IDs that the field is available in.
- required
boolean
(optional)Whether the custom field is required to submit the form.
- public
boolean
(optional)Whether the custom field should be visible to users.
- encrypted
boolean
(optional)Whether to encrypt the custom field value in the database.
- purge
boolean
(optional)Whether to purge the custom field.
- locked
boolean
(optional)Whether to prevent edits to the custom field.
- options
array
(optional)An array of options in the format of ‘options[n][value]’, where ‘n’ should be replaced by a sequential integer. To add translations, use options[n][value:locale] replacing ‘locale’ with the ISO-639 locale. For example, ‘option[0][value]=opt1&option[0][value:en]=english_opt1’. Only applied to Checklist, Multiple Options, Options and Radio Buttons.
Headers
Content-Type: application/x-www-form-urlencoded
Body
required=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the custom field!",
"data": {
"id": 1,
"name": "IP Address",
"description": "Please enter your server's IP address.",
"type": 8,
"order": 1,
"required": 0,
"public": 1,
"encrypted": 0,
"purge": 0,
"locked": 0,
"created_at": 1446228389,
"updated_at": 1446228389
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The custom field with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/customfield/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the custom field!",
"data": null
}
Canned Response ¶
Commonly used replies by operators.
Show all of the records.GET/api/ticket/cannedresponse
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "test",
"text": "test",
"category_id": 1,
"user_id": null,
"all_groups": 1,
"department_id": null,
"priority_id": null,
"status_id": null,
"tags": "[]",
"created_at": 1446134483,
"updated_at": 1446134483
}
]
}
Display the specified resource.GET/api/ticket/cannedresponse/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Hello",
"text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
"user_id": null,
"public": 1,
"all_groups": 1,
"created_at": 1446134483,
"updated_at": 1446134483,
"tags": [],
"groups": []
}
}
Store a newly created resource in storage.POST/api/ticket/cannedresponse
Example URI
- name
string
(required)The name of the canned response. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- text
string
(required)The canned response. To add translations for the response text, add text:locale, such as ‘text:en’, to the request to store response text for that given translation.
- tag
array
(optional)An array of tag names for the canned response.
- groups
array
(optional)List of operator groups who can see the canned response, an empty array means available to all operators.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Hello&text=Hi,<br/>Thank you for your message, we'll get back to you shortly.&category_id=1&public=0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new canned response!",
"data": {
"id": 1,
"name": "Hello",
"text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
"user_id": null,
"public": 1,
"all_groups": 1,
"created_at": 1446134483,
"updated_at": 1446134483,
"tags": [],
"groups": []
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.PUT/api/ticket/cannedresponse/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the canned response. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- text
string
(optional)The canned response. To add translations for the response text, add text:locale, such as ‘text:en’, to the request to store response text for that given translation.
- tag
array
(optional)An array of tag names for the canned response. Will replace the existing tags on the canned response.
- groups
array
(optional)List of operator groups who can see the canned response, an empty array means available to all operators.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#999999
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the canned response!",
"data": {
"id": 1,
"name": "Hello",
"text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
"user_id": null,
"public": 1,
"all_groups": 1,
"created_at": 1446134483,
"updated_at": 1446134483,
"tags": [],
"groups": []
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The canned response with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/ticket/cannedresponse/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the canned response!",
"data": null
}
Department ¶
Tickets are divided into different departments.
Show all of the records.GET/api/ticket/department
Example URI
- brand_id
integer
(optional)Fetch departments that are assigned to the given brand.
- parent_id
integer
(optional)Fetch subdeparments of a given parent, set to 0 to fetch all parent departments only.
- public
boolean
(optional)Fetch public or hidden departments only.
- registered_only
boolean
(optional)Fetch departments that are only accessible to logged in users or all users.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Support",
"description": "This is an automatically generated department, please edit me.",
"order": 1,
"parent_id": null,
"public": 1,
"ticket_number_format": null,
"default_assignedto": null,
"notify_frontend_ticket": 1,
"notify_email_ticket": 1,
"notify_operators": 0,
"disable_user_email_replies": 0,
"email_templates": {
"user_ticket_opened": 3,
"user_ticket_reply": 2,
"user_ticket_waitingresponse": 11,
"user_ticket_autoclose": 13,
"user_ticket_operatorclose": 20,
"user_email_attachmentrejected": 21,
"user_ticket_disablereplies": -1,
"operator_assigned": 1,
"operator_ticket_opened": 4,
"operator_user_ticket_reply": 5,
"operator_internal_opened": 18,
"operator_department_changed": 19,
"operator_operator_ticket_reply": 23,
"operator_ticket_note": 24
},
"created_at": 1445441560,
"updated_at": 1445441560,
"emails": [
{
"id": 1,
"department_id": 1,
"address": "support@my.company",
"type": 0,
"protocol": null,
"server": null,
"username": null,
"password": null,
"port": null,
"encryption": null,
"consume_all": null,
"delete_downloaded": null,
"created_at": 0,
"updated_at": 0
}
],
"groups": [
{
"id": 1,
"name": "System Administrators",
"description": "Default group for administrators, always has all permissions.",
"colour": "#777777",
"administrator": 1,
"created_at": 1458390899,
"updated_at": 1458390899,
"pivot": {
"department_id": 4,
"group_id": 1
}
}
],
"operators": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Blogs",
"email": "joe.blogs@mycompany.com",
"email_verified": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": "...",
"created_at": 1445441612,
"updated_at": 1445954346,
"formatted_name": "Joe Blogs",
"pivot": {
"department_id": 1,
"user_id": 1
}
}
]
}
]
}
Display the specified resource.GET/api/ticket/department/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Support",
"description": "This is an automatically generated department, please edit me.",
"order": 1,
"parent_id": null,
"public": 1,
"ticket_number_format": null,
"default_assignedto": null,
"notify_frontend_ticket": 1,
"notify_email_ticket": 1,
"notify_operators": 0,
"disable_user_email_replies": 0,
"email_templates": {
"user_ticket_opened": 3,
"user_ticket_reply": 2,
"user_ticket_waitingresponse": 11,
"user_ticket_autoclose": 13,
"user_ticket_operatorclose": 20,
"user_email_attachmentrejected": 21,
"user_ticket_disablereplies": -1,
"operator_assigned": 1,
"operator_ticket_opened": 4,
"operator_user_ticket_reply": 5,
"operator_internal_opened": 18,
"operator_department_changed": 19,
"operator_operator_ticket_reply": 23,
"operator_ticket_note": 24
},
"created_at": 1445441560,
"updated_at": 1445441560,
"emails": [
{
"id": 1,
"department_id": 1,
"address": "support@my.company",
"type": 0,
"protocol": null,
"server": null,
"username": null,
"password": null,
"port": null,
"encryption": null,
"consume_all": null,
"delete_downloaded": null,
"created_at": 0,
"updated_at": 0
}
],
"groups": [
{
"id": 1,
"name": "System Administrators",
"description": "Default group for administrators, always has all permissions.",
"colour": "#777777",
"administrator": 1,
"created_at": 1458390899,
"updated_at": 1458390899,
"pivot": {
"department_id": 4,
"group_id": 1
}
}
],
"operators": [
{
"id": 1,
"firstname": "Joe",
"lastname": "Blogs",
"email": "joe.blogs@mycompany.com",
"email_verified": 1,
"organisation_id": null,
"organisation_access_level": null,
"country": null,
"language_code": null,
"timezone": null,
"avatar": "...",
"created_at": 1445441612,
"updated_at": 1445954346,
"formatted_name": "Joe Blogs",
"pivot": {
"department_id": 1,
"user_id": 1
}
}
]
}
}
Remove the specified resource from storage.DELETE/api/ticket/department/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the department!",
"data": null
}
Filter ¶
Pre-defined ticket filters with advanced conditions system.
Show all of the records.GET/api/ticket/filter
Example URI
- operator
integer
(optional)Shows filters only the operator can view and calculates the number of matching tickets if viewing the filters as this operator.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"name": "Inbox",
"user_id": null,
"all_groups": 1,
"condition_group_type": 1,
"created_at": 1486732738,
"updated_at": 1486732738,
"ticket_count": 14
}
]
}
Display the specified resource.GET/api/ticket/filter/{id}
Example URI
- id
integer
(required)The ID of the resource.
- operator
integer
(optional)Calculates the number of matching tickets if viewing the filter as this operator.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"name": "Inbox",
"user_id": null,
"all_groups": 1,
"condition_group_type": 1,
"created_at": 1486732738,
"updated_at": 1486732738,
"ticket_count": 14
}
}
Remove the specified resource from storage.DELETE/api/ticket/filter/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the filter!",
"data": null
}
Feedback ¶
User feedback ratings and responses on tickets.
Show all of the records.GET/api/ticket/feedback
Example URI
- ticket_id
integer
(optional)Only show records associated with the given ticket.
- user_id
integer
(optional)Only show records associated with the given user.
- rating
integer
(optional)Only show records matching the given rating (bad - 0, good - 1, neutral - 2).
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"created_at": 1700136102,
"expiry_time": 1700222502,
"fields_answered": 0,
"form": {
"condition_group_type": 0,
"created_at": 1700136102,
"description": "Est cum doloremque quis architecto dolore ea.",
"email_template_id": 25,
"expiry_time": 604800,
"fields": [],
"id": 26,
"name": "Darrel Hilpert",
"order": null,
"time_after_resolved": 86400,
"translations": [],
"updated_at": 1700136102
},
"form_id": 26,
"id": 25,
"rating": null,
"ticket_id": 1121,
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"updated_at": 1700136102,
"values": []
}
]
}
Display the specified resource.GET/api/ticket/feedback/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": [
{
"created_at": 1700136102,
"expiry_time": 1700222502,
"fields_answered": 0,
"form": {
"condition_group_type": 0,
"created_at": 1700136102,
"description": "Est cum doloremque quis architecto dolore ea.",
"email_template_id": 25,
"expiry_time": 604800,
"fields": [],
"id": 26,
"name": "Darrel Hilpert",
"order": null,
"time_after_resolved": 86400,
"translations": [],
"updated_at": 1700136102
},
"form_id": 26,
"id": 25,
"rating": null,
"ticket_id": 1121,
"token": "8c13b9225d3f8454e834460354678a1f246f79cd",
"updated_at": 1700136102,
"values": []
}
]
}
Update the specified resource in storage.PUT/api/ticket/feedback/{id}
Example URI
- id
integer
(required)The ID of the resource.
- rating
integer
(optional)The new rating (bad - 0, good - 1, neutral - 2).
- values
array
(optional)An array of values keyed by custom field IDs.
Headers
Content-Type: application/x-www-form-urlencoded
Body
rating=1&values[1]=foobar
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the ticket feedback!",
"data": {
"created_at": 1700136907,
"expiry_time": 1700223307,
"fields_answered": 1,
"form": {
"condition_group_type": 0,
"created_at": 1700136907,
"description": "Nesciunt et ea consequatur.",
"email_template_id": 25,
"expiry_time": 604800,
"fields": [
{
"created_at": 1700136907,
"form_id": 28,
"id": 1,
"name": "Text",
"translations": [],
"type": 8,
"updated_at": 1700136907
}
],
"id": 28,
"name": "Oren Turner V",
"order": null,
"time_after_resolved": 86400,
"translations": [],
"updated_at": 1700136907
},
"form_id": 28,
"id": 27,
"rating": 1,
"ticket_id": 1123,
"token": "Omnis aliquam.",
"updated_at": 1700136907,
"values": [
{
"created_at": 1700136907,
"feedback_id": 27,
"field_id": 1,
"id": 1,
"updated_at": 1700136907,
"value": "foobar"
}
]
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The ticket feedback with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The rating field is required.",
"data": null
}
Settings ¶
Ticket system settings.
General SettingsGET/api/ticket/settings
Example URI
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"allowed_files": "doc|docx|png|gif|jpg|jpeg|zip|rar|pdf|txt|tpl|log",
"default_open_status": "1",
"default_resolved_status": "2",
"inactive_close_time": "604800",
"ticket_notes_position": "0",
"ticket_number_format": "%N{7}",
"ticket_reply_order": "0"
}
}
Channel Settings ¶
Fetch the settings for a given channel.
Channel SettingsGET/api/ticket/channel/{channel}/settings
Example URI
- channel
string
(required)The channel name, e.g. ‘web’.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"unauthenticated_users": "1",
"show_captcha": "1",
"show_related_articles": "1"
}
}
Self-Service ¶
Type ¶
Self-service types, individual sections in the frontend for self-service content.
Show all of the records.GET/api/selfservice/type
Example URI
- brand_id
integer
(optional)The brand that the type belongs to.
- enabled
boolean
(optional)If the type is enabled.
- internal
boolean
(optional)If the type is public to users or internally available to operators.
- content
boolean
(optional)The type content, 0 for articles and 1 for external link.
- view
boolean
(optional)The view type, 0 for hierarchical view and 1 for list view.
- article_ordering
integer
(optional)The ordering for articles in lists shown in the frontend, 0 for alphabetical, 1 for most popular, 2 for most recent and 3 for random. Only applies to articles content types.
- show_on_dashboard
boolean
(optional)If the most popular/latest articles should show on the frontend dashboard.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"brand_id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"order": 1,
"enabled": 1,
"internal": 0,
"view": 1,
"icon": "fa-newspaper",
"article_ordering": 2,
"show_on_dashboard": 1,
"created_at": 1418237799,
"updated_at": 1418237799,
"brand": {
"id": 1,
"name": "MyCompany",
"system_url": "http://www.mycompany.com",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany.com",
"global_email_header": "...",
"global_email_footer": "...",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": "0",
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1458390899,
"updated_at": 1458390899
}
}
]
}
Display the specified resource.GET/api/selfservice/type/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"brand_id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"order": 1,
"enabled": 1,
"internal": 0,
"content": 0,
"view": 1,
"icon": "fa-newspaper",
"article_ordering": 2,
"show_on_dashboard": 1,
"external_link": null,
"created_at": 1418237799,
"updated_at": 1418237799,
"brand": {
"id": 1,
"name": "MyCompany",
"system_url": "http://www.mycompany.com",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany.com",
"global_email_header": "...",
"global_email_footer": "...",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": "0",
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1458390899,
"updated_at": 1458390899
}
}
}
Store a newly created resource in storage.POST/api/selfservice/type
Example URI
- brand_id
integer
(required)The ID of the brand this self-service type will be shown under.
- name
string
(required)The name of the type. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- description
string
(optional)A description of the type, shows under the name on the frontend dashboard. Required for public (non-internal) types. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- enabled
boolean
(optional) Default: 1If the type is enabled.
- protected
boolean
(optional) Default: 0If only logged in users can view the content in this type.
- internal
boolean
(optional) Default: 0If the type is public to users or internally available to operators.
- order
integer
(optional)Position of the type.
- icon
integer
(optional) Default: fa-bookWhich icon to show on the frontend, accepts any FontAwesome icon prefixed with ‘fa-’.
- content
boolean
(required)The type content, 0 for articles and 1 for external link.
- view
boolean
(optional)The view type for articles content, 0 for hierarchical view and 1 for list view. Required if content is set to 0.
- article_ordering
integer
(optional)The ordering for articles in lists shown in the frontend, 0 for alphabetical, 1 for most popular, 2 for most recent and 3 for random. Only applies to articles content types.
- show_on_dashboard
boolean
(optional) Default: 1Shows some articles on the frontend dashboard. If view is set to hierarchical, it will show the 5 most viewed articles, else if list, it will show the 5 latest articles. Only applies to articles content types.
- external_link
string
(optional)If the type content is external link, enter the URL to link to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
brand_id=1&name=Announcements&description=View+the+latest+news+and+announcements.&icon=fa-newspaper&content=0&view=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new type!",
"data": {
"id": 1,
"brand_id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"order": 1,
"enabled": 1,
"internal": 0,
"content": 0,
"view": 1,
"icon": "fa-newspaper",
"article_ordering": 2,
"show_on_dashboard": 1,
"external_link": null,
"created_at": 1418237799,
"updated_at": 1418237799,
"brand": {
"id": 1,
"name": "MyCompany",
"system_url": "http://www.mycompany.com",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany.com",
"global_email_header": "...",
"global_email_footer": "...",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": "0",
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1458390899,
"updated_at": 1458390899
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.PUT/api/selfservice/type/{id}
Example URI
- id
integer
(required)The ID of the resource.
- brand_id
integer
(optional)The ID of the brand this self-service type will be shown under.
- name
string
(optional)The name of the type. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- description
string
(optional)A description of the type, shows on the frontend dashboard. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.
- enabled
boolean
(optional)If the type is enabled.
- protected
boolean
(optional) Default: 0If only logged in users can view the content in this type.
- internal
boolean
(optional)If the type is public to users or internally available to operators.
- order
integer
(optional)Position of the type.
- icon
integer
(optional)Which icon to show on the frontend, accepts any FontAwesome icon prefixed with ‘fa-’.
- content
boolean
(optional)The type content, 0 for articles and 1 for external link.
- view
boolean
(optional)The view type for articles content, 0 for hierarchical view and 1 for list view. Required if content is set to 0.
- article_ordering
integer
(optional)The ordering for articles in lists shown in the frontend, 0 for alphabetical, 1 for most popular, 2 for most recent and 3 for random. Only applies to articles content types.
- show_on_dashboard
boolean
(optional)Shows some articles on the frontend dashboard. If view is set to hierarchical, it will show the 5 most viewed articles, else if list, it will show the 5 latest articles. Only applies to articles content types.
- external_link
string
(optional)If the type content is external link, enter the URL to link to.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Announcements&view=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the type!",
"data": {
"id": 1,
"brand_id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"order": 1,
"enabled": 1,
"internal": 0,
"content": 0,
"view": 1,
"icon": "fa-newspaper",
"article_ordering": 2,
"show_on_dashboard": 1,
"external_link": null,
"created_at": 1418237799,
"updated_at": 1418237799,
"brand": {
"id": 1,
"name": "MyCompany",
"system_url": "http://www.mycompany.com",
"frontend_logo": "",
"frontend_template": "default",
"default_email": "support@mycompany.com",
"global_email_header": "...",
"global_email_footer": "...",
"email_method": "default",
"smtp_host": "",
"smtp_port": 0,
"smtp_encryption": "0",
"smtp_requires_auth": 0,
"smtp_username": "",
"smtp_password": "",
"default_country": "default",
"default_timezone": "default",
"date_format": "default",
"time_format": "default",
"default_language": "default",
"language_toggle": 2,
"created_at": 1458390899,
"updated_at": 1458390899
}
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The type with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/type/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the type!",
"data": null
}
Tag ¶
Self-service tags, another way to categorise articles.
Show all of the records.GET/api/selfservice/tag
Example URI
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
]
}
Display the specified resource.GET/api/selfservice/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
Store a newly created resource in storage.POST/api/selfservice/tag
Example URI
- name
string
(required)The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Reseller
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new tag!",
"data": {
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/selfservice/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
- name
string
(optional)The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Reseller
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the tag!",
"data": {
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The tag with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/tag/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the tag!",
"data": null
}
Category ¶
Self-service categories, filterable by type.
Show all of the records.GET/api/selfservice/category
Example URI
- type_id
integer
(optional)The type of the categories.
- parent_id
integer
(optional)Fetch categories with the given parent, set to 0 to fetch all top level categories only.
- public
boolean
(optional)If the category is public to users.
- parent_public
boolean
(optional)If the top level parent category is public to users.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"type_id": 1,
"parent": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1446329149,
"updated_at": 1446329149,
"type": {
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905
}
}
]
}
Display the specified resource.GET/api/selfservice/category/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"type_id": 1,
"parent": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1446329149,
"updated_at": 1446329149,
"type": {
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905
}
}
}
Store a newly created resource in storage.POST/api/selfservice/category
Example URI
- type_id
integer
(required)The type that the category belongs to.
- name
string
(required)The name of the category. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- parent_id
integer
(optional)If the category is a child, enter the parent ID. The parent must have the same type.
- public
boolean
(optional) Default: 0If the category is public to users.
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&name=Support&public=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new category!",
"data": {
"id": 1,
"type_id": 1,
"parent": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1446329149,
"updated_at": 1446329149,
"type": {
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/selfservice/category/{id}
Example URI
- id
integer
(required)The ID of the resource.
- type_id
integer
(optional)The type that the category belongs to.
- name
string
(optional)The name of the category. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.
- slug
string
(optional)The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- parent_id
integer
(optional)If the category is a child, enter the parent ID. The parent must have the same type.
- public
boolean
(optional)If the category is public to users.
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&name=Support&public=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the category!",
"data": {
"id": 1,
"type_id": 1,
"parent": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1446329149,
"updated_at": 1446329149,
"type": {
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905
}
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The category with given ID was not found.",
"data": null
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/category/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the category!",
"data": null
}
Article ¶
Self-service articles, filterable by type, category and tags.
Show all of the records.GET/api/selfservice/article
Example URI
- type_id
integer
(optional)The type of the articles.
- category_id
integer
(optional)The category of the articles.
- tag_id
integer
(optional)The tag associated with articles.
- include_subcategories
boolean
(optional) Default: 0Include articles from subcategories of given category
- published
boolean
(optional)Show published (1) articles or unpublished (0) articles only.
- protected
boolean
(optional)Show protected (1) articles or unprotected (0) articles only.
- pinned
boolean
(optional)If the article is pinned to show at the top on the frontend.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for articles created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for articles created before a certain date (UNIX timestamp).
- updated_at_min
integer
(optional)Filter for articles updated since a certain date (UNIX timestamp).
- updated_at_max
integer
(optional)Filter for articles updated before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
]
}
Display the specified resource. Also can add a view to the article view counter.GET/api/selfservice/article/{id}
Example URI
- id
integer
(required)The ID of the resource.
- type_id
integer
(optional)The article type, recommended to include if you are trying to show the article for a known self-service type.
- increment_views (boolean, optional) - Increment the article view count, requires the type_id.
string
(required) Default: 0
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
}
Store a newly created resource in storage.POST/api/selfservice/article
Example URI
- author_id
integer
(required)The ID of the operator who has written this article.
- title
string
(required)The title of the article. To add translations for the title, add title:locale, such as ‘title:en’, to the request to store a title for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the title. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- excerpt
string
(optional)An excerpt of the article, maximum 255 characters. To add translations for the excerpt, add excerpt:locale, such as ‘excerpt:en’, to the request to store an excerpt for that given translation.
- text
string
(required)The article text. To add translations for the article text, add text:locale, such as ‘text:en’, to the request to store article text for that given translation.
- category
array
(required)An array of category IDs to which the article belongs to.
- tag
array
(optional)An array of tags for the article, use the full tag name and not IDs.
- published
boolean
(optional) Default: 0If the article is published to users.
- published_at
integer
(optional)Unix timestamp for the time that the article was published.
- protected
boolean
(optional) Default: 0If only logged in users can view the article.
- pinned
boolean
(optional) Default: 0If the article is pinned to show at the top on the frontend. Only applies to list view types.
Headers
Content-Type: application/x-www-form-urlencoded
Body
author_id=1&title=Test+Article&excerpt=This+is+a+test+article+for+the+help+desk&text=This+is+a+test+article,+please+make+sure+this+is+right+before+publishing+it.&published=1&protected=0&category[]=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new article!",
"data": {
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The name field is required.",
"data": null
}
Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.PUT/api/selfservice/article/{id}
Example URI
- id
integer
(required)The ID of the resource.
- author_id
integer
(optional)The ID of the operator who has written this article.
- title
string
(optional)The title of the article. To add translations for the title, add title:locale, such as ‘title:en’, to the request to store a title for that given translation.
- slug
string
(optional)The slug is the URL-friendly version of the title. It is usually all lowercase and contains only letters, numbers, and hyphens. To add translations, add slug:locale, such as ‘slug:en’, to the request.
- excerpt
string
(optional)An excerpt of the article, maximum 255 characters. To add translations for the excerpt, add excerpt:locale, such as ‘excerpt:en’, to the request to store an excerpt for that given translation.
- text
string
(optional)The article text. To add translations for the article text, add text:locale, such as ‘text:en’, to the request to store article text for that given translation.
- category
array
(optional)An array of category IDs to which the article belongs to.
- tag
array
(optional)An array of tags for the article, use the full tag name and not IDs.
- published
boolean
(optional)If the article is published to users.
- published_at
string
(optional)Unix timestamp for the time that the article was published.
- protected
boolean
(optional)If only logged in users can view the article.
- pinned
boolean
(optional)If the article is pinned to show at the top on the frontend. Only applies to list view types.
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&author_id=1&title=Test+Article&excerpt=This+is+a+test+article+for+the+help+desk&text=This+is+a+test+article,+please+make+sure+this+is+right+before+publishing+it.&published=1&protected=0&category[]=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the article!",
"data": {
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The article with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/article/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the article!",
"data": null
}
Search for articles with a term.GET/api/selfservice/article/search
Example URI
- term
string
(required)The query to use when searching for articles.
- type_id
integer
(optional)If we want to limit it to a single type.
- brand_id
integer
(optional)If we want to limit it to a single brand.
- published
boolean
(optional) Default: 1If the article is published to users (one or more category must be visible).
- protected
boolean
(optional) Default: 0Include protected (logged in users only) articles.
- order_column
string
(optional) Default: weightThe column to sort by.
- order_direction
string
(optional) Default: desc (if order_column is weight), asc (all other cases)The ordering of the results.
- limit
integer
(optional) Default: 10The amount of results to fetch.
Headers
Content-Type: application/x-www-form-urlencoded
Body
term=test&brand_id=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
]
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The term field is required.",
"data": null
}
Fetch related published articles (specific type only) for a term.GET/api/selfservice/article/related
Example URI
- term
string
(required)The query to use when searching for related articles.
- type_id
integer
(required)If we want to limit it to a single type.
- protected
boolean
(optional) Default: 0Include protected (logged in users only) articles.
- limit
integer
(optional) Default: 3The amount of results to fetch.
Headers
Content-Type: application/x-www-form-urlencoded
Body
term=test&type_id=1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199,
"frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
"categories": {
"0": {
"id": 1,
"type_id": 1,
"parent_id": null,
"name": "General",
"slug": "general",
"public": 1,
"parent_public": 1,
"created_at": 1449600034,
"updated_at": 1449600034,
"pivot": {
"article_id": 1,
"category_id": 1
}
},
"types": [
{
"id": 1,
"name": "Announcements",
"slug": "announcements",
"description": "View the latest news and announcements.",
"view": 1,
"icon": "...",
"show_on_dashboard": 1,
"created_at": 1445611905,
"updated_at": 1445611905,
"pivot": {
"article_id": 1,
"type_id": 1,
"views": 1
}
}
],
"tags": [
{
"id": 1,
"name": "Test",
"slug": "test",
"created_at": 1449599991,
"updated_at": 1449600099,
"pivot": {
"article_id": 1,
"tag_id": 1
}
}
],
"attachments": []
}
}
]
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The term field is required.",
"data": null
}
Post a rating for article.POST/api/selfservice/article/{id}/rating
Example URI
- id
integer
(required)The ID of the article.
- rating
integer
(required)Whether the article has been rated positively (1), neutrally (2) or negatively (0).
- user_ip
string
(required)The IP address of the user, only one vote per IP.
- user_id
integer
(optional)If the rating is tied to a registered user, enter their user ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
rating=1&user_ip=192.168.0.1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "The article was successfully rated.",
"data": {
"id": 1,
"author_id": 1,
"title": "Test Article",
"slug": "test-article",
"excerpt": "This is an article",
"text": "An article for the masses.",
"published": 1,
"published_at": 1446329199,
"protected": 0,
"pinned": 0,
"created_at": 1446329199,
"updated_at": 1446329199
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The rating field is required.",
"data": null
}
Comment ¶
Comments made on self-service articles.
Show all of the records.GET/api/selfservice/comment
Example URI
- article_id
integer
(optional)The article that the comment was posted on.
- type_id
integer
(optional)The self-service type of the article that the comment was posted on.
- status
integer
(optional)The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.
- parent_id
integer
(optional)The ID of the parent comment.
- root_parent_id
integer
(optional)The ID of the root (upper most) parent comment.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
- created_at_min
integer
(optional)Filter for comments created since a certain date (UNIX timestamp).
- created_at_max
integer
(optional)Filter for comments created before a certain date (UNIX timestamp).
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"article_id": 1,
"type_id": 1,
"author_id": 1,
"text": "This is a comment!",
"parent_id": null,
"root_parent_id": null,
"rating": 0,
"status": 0,
"notify_reply": 1,
"created_at": 1446331613,
"updated_at": 144633161
}
]
}
Display the specified resource.GET/api/selfservice/comment/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"article_id": 1,
"type_id": 1,
"author_id": 1,
"text": "This is a comment!",
"parent_id": null,
"root_parent_id": null,
"rating": 0,
"status": 0,
"notify_reply": 1,
"created_at": 1446331613,
"updated_at": 144633161
}
}
Store a newly created resource in storage.POST/api/selfservice/comment
Example URI
- article_id
integer
(required)The article the the comment is being posted to.
- type_id
integer
(required)The type of the article the the comment is being posted to.
- parent_id
integer
(optional)If this comment is a reply, set as the parent comment ID.
- author_id
integer
(optional)The commenter user ID, use the name field if not currently a user.
- name
string
(optional)The name of the commenter (when not logged in). Required if no author_id set.
- text
string
(required)The comment text.
- status
integer
(optional) Default: 0The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.
- notify_reply
boolean
(optional) Default: 0If the user would like to be notified on a reply, only applicable to users with email addresses.
Headers
Content-Type: application/x-www-form-urlencoded
Body
article_id=1&type_id=1&author_id=1&text=This+is+a+comment!
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new comment!",
"data": {
"id": 1,
"article_id": 1,
"type_id": 1,
"author_id": 1,
"text": "This is a comment!",
"parent_id": null,
"root_parent_id": null,
"rating": 0,
"status": 0,
"notify_reply": 1,
"created_at": 1446331613,
"updated_at": 144633161
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The article_id field is required.",
"data": null
}
Update the specified resource in storage.PUT/api/selfservice/comment/{id}
Example URI
- id
integer
(required)The ID of the resource.
- article_id
integer
(optional)The article the the comment is being posted to.
- type_id
integer
(optional)The type of the article the the comment is being posted to.
- parent_id
integer
(optional)If this comment is a reply, set as the parent comment ID.
- author_id
integer
(optional)The commenter user ID.
- text
string
(optional)The comment text.
- status
integer
(optional)The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.
- notify_reply
boolean
(optional)If the user would like to be notified on a reply, only applicable to users with email addresses.
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=This+is+a+comment!
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully updated the comment!",
"data": {
"id": 1,
"article_id": 1,
"type_id": 1,
"author_id": 1,
"text": "This is a comment!",
"parent_id": null,
"root_parent_id": null,
"rating": 0,
"status": 0,
"notify_reply": 1,
"created_at": 1446331613,
"updated_at": 144633161
}
}
404
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The comment with given ID was not found.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/comment/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the comment!",
"data": null
}
Post a rating for comment.POST/api/selfservice/comment/{id}/rating
Example URI
- id
integer
(required)The ID of the comment.
- score
integer
(required)Whether the comment has been rated positively (1), neutrally (0) or negatively (-1).
- user_ip
string
(required)The IP address of the user, only one vote per IP.
- user_id
integer
(optional)If the rating is tied to a registered user, enter their user ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
score=1&user_ip=192.168.0.1
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "The comment was successfully rated.",
"data": {
"id": 1,
"article_id": 1,
"type_id": 1,
"author_id": 1,
"text": "This is a comment!",
"parent_id": null,
"root_parent_id": null,
"rating": 1,
"status": 0,
"notify_reply": 1,
"created_at": 1446331613,
"updated_at": 144633161
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The score field is required.",
"data": null
}
Article Attachment ¶
Show all of the records.GET/api/selfservice/attachment
Example URI
- article_id
integer
(optional)Only fetch attachments associated with the article ID.
- start
integer
(optional) Default: 1The first result to start from.
- limit
integer
(optional) Default: 50The amount of results to fetch.
- order_column
string
(optional) Default: idThe column to sort by.
- order_direction
string
(optional) Default: ascThe ordering of the results.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"id": 1,
"upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"article_id": 1,
"original_name": "filename.png",
"created_at": 1470400190,
"updated_at": 1470400190,
"upload": {
"id": 1,
"hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"filename": "filename.png",
"folder": "selfservice",
"mime": "image/png",
"size": "6.6 KB",
"created_at": 1470400188,
"updated_at": 1470400188
}
}
]
}
Display the specified resource.GET/api/selfservice/attachment/{id}
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"id": 1,
"upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"article_id": 1,
"original_name": "filename.png",
"created_at": 1470400190,
"updated_at": 1470400190,
"upload": {
"id": 1,
"hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"filename": "filename.png",
"folder": "selfservice",
"mime": "image/png",
"size": "6.6 KB",
"created_at": 1470400188,
"updated_at": 1470400188
}
}
}
Download the specified resource. Returns file data.GET/api/selfservice/attachment/{id}/download
Example URI
- id
integer
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Store a newly created resource in storage.POST/api/selfservice/attachment
Example URI
- article_id
integer
(required)The article to associate the attachment with.
- filename
string
(required)The name of the file.
- contents
string
(required)The base64-encoded file contents being uploaded.
Headers
Content-Type: application/x-www-form-urlencoded
Body
article_id=1&filename=hello.jpg&contents=MQ==
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully created new attachment!",
"data": {
"id": 1,
"upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"article_id": 1,
"original_name": "filename.png",
"created_at": 1470400190,
"updated_at": 1470400190,
"upload": {
"id": 1,
"hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
"filename": "filename.png",
"folder": "selfservice",
"mime": "image/png",
"size": "6.6 KB",
"created_at": 1470400188,
"updated_at": 1470400188
}
}
}
422
Headers
Content-Type: application/json
Body
{
"status": "error",
"message": "The filename field is required.",
"data": null
}
Remove the specified resource from storage.DELETE/api/selfservice/attachment/{id}
Example URI
- id
string
(required)The ID of the resource.
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": "Successfully deleted the attachment!",
"data": null
}
Settings ¶
Self-service system settings.
General SettingsGET/api/selfservice/settings
Example URI
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": null,
"data": {
"comment_captcha": "1",
"comment_moderation": "1",
"comment_ordering": "2",
"comment_ratings": "1",
"comment_threshold": "-2",
"comment_write": "0",
"comments_enabled": "1",
"rating_post": "0",
"ratings_enabled": "1"
}
}