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

Replies REST API Route

Replies REST API Route

List and create ticket replies via 3rd party applications

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"}'


Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

Developer Docs REST API Last updated: 21/01/2021

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

Ticket Departments REST API Route

Next

Form Fields REST API Route

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