Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

Adding Google reCAPTCHA Fields

KB Articles

All of the KB Support documentation in one place

Adding Google reCAPTCHA Fields

KB Support enables the use of the Google ReCAPTCHA service to help keep malicious software from engaging in abusive activities on your website.

Read More

25/01/2021

Customising Template Files

KB Support utilises template files to display content on the front end of your website. These files can be customised as described below.

Read More

21/01/2021

Forms REST API Route

Authentication #

No authentication is required for this route.

Schema #

When working with the Forms REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the form
Read Only
date
string
The date the form was published, in the site’s timezone
date_gmt
string
The date the form was published, as GMT
modified
string
The date the form was last modified, in the site’s timezone
modified_gmt
string
The date the form was last modified, as GMT
status
string
The named status of the form
One of: publish, future, draft, pending, private
title
object
The title of the form
meta
object
Meta fields
fields
object
Form fields
links
object
Links associated with the ticket

List Forms #

Query this endpoint to retrieve a collection of forms. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/forms

Example Request #

$ curl https://example.com/wp-json/kbs/v1/forms

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
search Limit results to those matching a string
exclude Ensure result set excludes specific post IDs
include Limit result set to specific post IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: title
One of: id, date, modified, include, title
status
string | array
Limit result set to forms assigned one or more statuses
Default: publish
slug Limit result set to posts with one or more specific slugs

Retrieve a Single Form #

Definitions #

GET /kbs/v1/forms/<id>

Example Request #

$ curl https://example.com/wp-json/kbs/v1/forms/<id>

Arguments #

id WP Post ID of the form
12/01/2021

Form Fields REST API Route

Authentication #

No authentication is required for this route.

Schema #

When working with the Form Fields REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the field
Read Only
date
string
The date the field was published, in the site’s timezone
date_gmt
string
The date the field was published, as GMT
modified
string
The date the field was last modified, in the site’s timezone
modified_gmt
string
The date the field was last modified, as GMT
title
object
The title of the field
parent
integer
The post parent ID
menu_order
integer
Menu order
meta
integer
Meta fields
links
object
Links associated with the ticket

List Fields #

Query this endpoint to retrieve a collection of fields. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/forms/fields

Example Request #

$ curl https://example.com/wp-json/kbs/v1/forms/fields

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
search Limit results to those matching a string
exclude Ensure result set excludes specific post IDs
include Limit result set to specific post IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: title
One of: id, date, modified, include, title, parent, menu_order
status
string | array
Limit result set to fields assigned one or more statuses
Default: publish
slug Limit result set to fields with one or more specific slugs
parent Limit result set to fields with particular parent IDs
parent_exclude Limit result set to all fields except those of a particular parent ID

Retrieve a Single Field #

Definitions #

GET /kbs/v1/forms/fields/<id>

Example Request #

$ curl https://example.com/wp-json/kbs/v1/forms/fields/<id>

Arguments #

id WP Post ID of the field
12/01/2021

Replies REST API Route

Authentication #

Authentication is required for this route. The authenticated user will be able to retrieve ticket replies for tickets to which they have access. They will also be able to create new ticket replies. It is recommended that a user with the role of Support Manager or higher is used.

Schema #

When working with the Replies REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the ticket reply
Read Only
date
string
The date the reply was published, in the site’s timezone
date_gmt
string
The date the reply was published, as GMT
modified
string
The date the reply was last modified, in the site’s timezone
modified_gmt
string
The date the reply was last modified, as GMT
status
string
The named status of the reply
One of: publish
content
object
The content for the reply
ticket_data
object
Ticket fields
See Ticket Data Object
links
object
Links associated with the ticket
Ticket Data Object #
The following fields are included within the ticket_data object
id
integer
Unique WP Post identifier for the ticket
number
string
Unique identifier for the ticket
key
string
Unique key for the ticket
status
string
The named status of the ticket
One of: new, open, hold, closed – additional values may be available if the KBS Custom Ticket Status extension is installed
title
string
The title of the ticket

Retrieve a List Replies of Ticket #

Query this endpoint to retrieve a collection of replies for the given ticket ID. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/replies/ticket/<id>

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
exclude Ensure result set excludes specific post IDs
include Limit result set to specific post IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: id
One of: id, date, agent, customer, modified, include
customer Limit result set to tickets logged by customers with a specific KBS user ID
agent Limit result set to tickets assigned to an agent with a specific WP user ID

Retrieve a Single Ticket  Reply #

Definition #

GET /kbs/v1/replies/<id>

Example Request #

$ curl https://example.com/wp-json/kbs/v1/tickets/<id>

Arguments #

id WP Post ID of the ticket

Add a New Ticket  Reply #

Arguments #

id
integer
required
Unique WP Post ID of ticket to which to add reply
reply_content
text
required
The content of the ticket reply
reply_author
integer
WP User ID of reply author
Default: Current user ID
agent
integer
User ID or email address of agent from whom reply is being authored
ticket_status
string
The status to update the ticket to once the reply is added
One of: open, hold, closed – or any custom status registered via the KBS Custom Ticket Status extension if installed
close_ticket
bool
A true closes the ticket once the reply is added
Default: false

Definition #

POST /kbs/v1/replies/ticket/<id>

Example Request #

$ curl -X POST https://example.com/wp-json/kbs/v1/replies/ticket/<id> -d '{"reply_content":"This is my reply"}'

12/01/2021

Agents REST API Route

Authentication #

Authentication is required for this route and the authenticated user is required to have the ticket manager role. It is recommended that a user with the role of Support Manager or higher is used.

Schema #

When working with the Agents REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the agent
Read Only
name
string
The display name of the agent
first_name
string
The first name of the agent
last_name
string
The last name of the agent
email
string
The email address of the agent

List Agents #

Query this endpoint to retrieve a collection of KB Support agents. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/agents

Example Request #

$ curl https://example.com/wp-json/kbs/v1/agents

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
exclude Ensure result set excludes specific agent IDs
include Limit result set to specific agent IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: id
One of: id, include, name, slug, email, registered_date
search
string
Limit result set to a search string

Retrieve a Single Agent #

Definition #

GET /kbs/v1/agents/<id>

Example Request #

$ curl https://example.com/wp-json/kbs/v1/agents/<id>

Arguments #

id WP User ID of the agent
12/01/2021

Tickets REST API Route

Authentication #

Authentication is required for this route. The authenticated user will be able to retrieve and update tickets to which they have access. They will also be able to create new tickets. It is recommended that a user with the role of Support Manager or higher is used.

Schema #

When working with the Tickets REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the ticket
Read Only
date
string
The date the ticket was published, in the site’s timezone
date_gmt
string
The date the ticket was published, as GMT
modified
string
The date the ticket was last modified, in the site’s timezone
modified_gmt
string
The date the ticket was last modified, as GMT
status
string
The named status of the ticket
One of: new, open, hold, closed – additional values may be available if the KBS Custom Ticket Status extension is installed
title
object
The title of the ticket
content
object
The content for the ticket
ticket_data
object
Ticket fields
See Ticket Data Object
replies
integer
The count of replies associated with the ticket
links
object
Links associated with the ticket
Ticket Data Object #
The following fields are included within the ticket_data object
resolved_date
string
The date the ticket was resolved, in local timezone
number
string
Unique identifier for the ticket
key
string
Unique key for the ticket
files
object
Data of files associated with ticket
agent
integer
WP user ID of agent assigned to the ticket
additional_agents
object
WP user ID’s of additional agent workers of the ticket
customer
integer
KBS user ID of the ticket customer
email
string
Email address of the ticket customer
user_id
integer
WP user ID of the ticket customer
user_info
object
Ticket customer information
company
integer
ID of company associated with the ticket
participants
object
Email addresses of ticket participants
form_data
object
The data that was submitted via a submission form

List Tickets #

Query this endpoint to retrieve a collection of tickets that the authenticated user has access to. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/tickets

Example Request #

$ curl https://example.com/wp-json/kbs/v1/tickets

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
exclude Ensure result set excludes specific post IDs
include Limit result set to specific post IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: id
One of: id, date, title, agent, customer, modified, include
status
string | array
Limit result set to tickets assigned one or more statuses
Default: All registered ticket statuses
One of: new, open, hold, closed – or any custom status registered via the KBS Custom Ticket Status extension if installed
user Limit result set to tickets logged by customers with a specific WP user ID
customer Limit result set to tickets logged by customers with a specific KBS user ID
company Limit result set to tickets associated with a specific company ID
agent Limit result set to tickets assigned to an agent with a specific WP user ID

Retrieve a Single Ticket #

Definitions #

GET /kbs/v1/tickets/<id>

GET /kbs/v1/tickets/<number>

Example Requests #

Retrieve Ticket by WP Post ID
$ curl https://example.com/wp-json/kbs/v1/tickets/<id>

Retrieve Ticket by KBS Ticket Number
$ curl https://example.com/wp-json/kbs/v1/tickets/<number>

Arguments #

id WP Post ID of the ticket
number KBS ticket number

Create a Ticket #

Arguments #

ticket_title
string
required
The subject of the ticket
ticket_content
text
required
The content of the ticket
customer_email
string
required
Customers email address
customer_first
string
required
Customers first name
customer_last
string
required
Customers Last Name
customer_phone1
string
Customers primary phone number
customer_phone2
string
Customers additional phone number
customer_website
string
Customers website address
agent_id
integer | string
WP user ID or email address of agent to be assigned to ticket
post_category
integer
ID of category to which to add the ticket
department
integer
ID of department to which to assign the ticket

Definition #

POST /kbs/v1/tickets

Update a Ticket #

Arguments #

id
integer
WP Post ID of the ticket
agent
integer | string
WP user ID or email address of agent to be assigned to ticket
agents
string
Comma separated list of agents to be added as workers of the ticket
company
integer
ID of company to associate with ticket
customer
integer | string
KBS ID or email address of customer to associate with ticket
status
string
The updated status of the ticket
One of: open, hold, closed – or any custom status registered via the KBS Custom Ticket Status extension if installed
post_category
integer
ID of a category to add to the ticket
department
integer
ID of department to which to assign the ticket

Definition #

POST /kbs/v1/tickets/<id>

Example Request #

$ curl -X POST https://example.com/wp-json/kbs/v1/tickets/<id> -d '{"status":"closed"}'

12/01/2021

Using the REST API

You can use the KB Support REST API to retrieve information regarding Tickets, Customers and Agents via 3rd party applications. You can also use the REST API to remotely create content such as tickets and replies.

Read More

12/01/2021

Ticket Categories REST API Route

Authentication #

Authentication is only required for this route if you are adding or editing categories.

Schema #

When working with the Ticket Categories REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the term
Read Only
count
integer
Number of tickets for the term
Read Only
description
string
HTML description of the term
link
string
URL of the term
Read Only
name
string
HTML title for the term
slug
string
An alphanumeric identifier for the term unique to its type
taxonomy
string
Type attribution for the term
Read Only
parent
integer
The parent term ID
meta
object
Meta fields

List Ticket Categories #

Query this endpoint to retrieve a collection of ticket categories. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /wp/v2/ticket_categories

Example Request #

$ curl https://example.com/wp-json/wp/v2/ticket_categories

Arguments #

context Scope under which the request is made; determines fields present in response
Default: view
One of: view, embed, edit
page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
search Limit results to those matching a string
exclude Ensure result set excludes specific IDs
include Limit result set to specific IDs
order Order sort attribute ascending or descending
Default: asc
One of: asc, desc
orderby Sort collection by term attribute
Default: name
One of: id, include, name, slug, include_slugs, term_group, description, count
hide_empty Whether to hide terms not assigned to any posts
parent Limit result set to terms assigned to a specific parent
post Limit result set to terms assigned to a specific ticket
slug Limit result set to terms with one or more specific slugs

Create a Ticket Category #

Arguments #

description HTML description of the term
name
Required
HTML title for the term.
slug An alphanumeric identifier for the term unique to its type
parent The parent term ID
meta Meta fields

Definition #

POST /wp/v2/ticket_categories

Retrieve a Ticket Category #

Definition #

GET /wp/v2/ticket_categories/<id>

Example Request #

$ curl https://example.com/wp-json/wp/v2/ticket_categories/<id>

Arguments #

id Unique identifier for the term
context Scope under which the request is made; determines fields present in response
Default: view
One of: view, embed, edit

Update a Ticket Category #

Arguments #

id Unique identifier for the term
description HTML description of the term
name HTML title for the term
slug An alphanumeric identifier for the term unique to its type
parent The parent term ID
meta Meta fields

Definition #

POST /wp/v2/ticket_categories/<id>

Example Request #

$ curl -X POST https://example.com/wp-json/wp/v2/ticket_categories/<id> -d '{"description":"My ticket term"}'

Delete a Ticket Category #

Arguments #

id Unique identifier for the term
force Required to be true, as terms do not support trashing

Definition #

DELETE /wp/v2/ticket_categories/<id>

Example Request #

$ curl -X DELETE https://example.com/wp-json/wp/v2/ticket_categories/<id>

12/01/2021

Companies REST API Route

Authentication #

Authentication is required for this route and the authenticated user is required to have the ticket manager role. It is recommended that a user with the role of Support Manager or higher is used.

Schema #

When working with the Companies REST API route the following fields can be expected in any responses.

id
integer
Unique identifier for the company
Read Only
title
object
The name of the company
slug
string
An alphanumeric identifier for the object unique to its type
featured_media
integer
ID of the featured media for the object (generally compant logo)
meta
object
Contains contact information for the company
Contains: _kbs_company_customer, _kbs_company_contact, _kbs_company_email, _kbs_company_phone, _kbs_company_website
links
object
Links associated with the company

List Company #

Query this endpoint to retrieve a collection of KB Support companies. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /kbs/v1/companies

Example Request #

$ curl https://example.com/wp-json/kbs/v1/companies

Arguments #

page Current page of the collection
Default: 1
per_page Maximum number of items to be returned in result set
Default: 10
exclude Ensure result set excludes specific company IDs
include Limit result set to specific company IDs
offset Offset the result set by a specific number of items
order Order sort attribute ascending or descending
Default: desc
One of: asc, desc
orderby Sort collection by object attribute
Default: id
One of: id, user_id, name, email, company_id, date
search Limit result set to specific search string

Retrieve a Single Company #

Definitions #

GET /kbs/v1/tickets/<id>

GET /kbs/v1/tickets/<number>

Example Requests #

$ curl https://example.com/wp-json/kbs/v1/companies/<id>

Arguments #

id WP Post ID of the ticket
12/01/2021
1 2 3 … 8 Next »

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code