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: ascdesc
orderby Sort collection by object attribute
Default: id
One of: iddate, agentcustomermodifiedinclude
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"}'


Was this article helpful?

KBS is now a LOGON product. For new and existing support requests, please send us an email.
If you have an open support ticket, please email us directly to follow up.
This is default text for notification bar