Requests
Request Object
Requests are represented as JSON objects with the following properties
id
integer
The ID of the request
title
string
The title of the request
state
string
The state of the request. Allowed values :
open
, in_progress
, pending
, on_hold
, solved
, closed
priority
string
The priority of the request.
Allowed values : low
, normal
, high
, urgent
author
object
An object containing details of the request author.
assignee
object
assigned_team
object
tickets
array
csat_survey
object
channel
object
collection
object
custom_field_values
object
An object containing custom field values
The object will have custom field ids as keys and the values of the custom fields as values of the object.
Note: Values will be ids in case of select
and multi_select
type custom fields.
request_thread
object
An object containing information related to the thread corresponding to the request.
triage_thread
object
sla_metrics
object
An object containing SLA metrics information
created_at
string
The creation timestamp of the request
updated_at
string
The update timestamp of the request
Assignee Object
Assignee of the request is represented as a JSON object with the following property
id
string
Slack/MS Teams User ID of the assignee for the request
Assigned Team Object
The assigned team for a request is represented as a JSON object with the following property:
id
number
The numeric ID of the assigned team for the request
Ticket Object
Tickets are represented as JSON objects with the following properties
id
integer
The ID of the ticket
type
string
Type of the ticket
Allowed values : zendesk
, jira
, jsm
, salesforce
, freshdesk
, hubspot
, clearfeed
, github
, intercom
, linear
key
string
The key used for the ticket id.
url
string
The url of the ticket.
created_at
string
The creation timestamp of the ticket
CSAT Survey Response Object
CSAT survey responses are represented as JSON objects with the following properties
status
string
Status of the csat_survey.
Allowed values:
pending
, received
response
object
This object will only be present if the status of the csat survey is received
Name
Type
Description
survey_type
string
Type of the the cast survey.
Allowed Values: five_point_rating
value
number
Points given in the CSAT survey response.
max_value
number
Maximum possible value of the response.
Name
Type
Description
survey_type
string
Type of the the cast survey.
Allowed Values: five_point_rating
value
number
Points given in the CSAT survey response.
max_value
number
Maximum possible value of the response.
Thread Object
Thread are represented as JSON objects with the following properties
channel_id
string
id of the channel where the thread exists.
thread_ts
string
id of the thread
team_id
string
team_id of the workspace where channel containing this thread exists.
url
string
URL of the thread
SLA Metrics Object
SLA Metrics are represented as JSON objects with the following properties
resolution_time
object
This field will hold null
if the request is currently not in solved
or closed
state.
Name
Type
Description
value
number
The time difference (in minutes) between when a request message was sent, and when it was resolved for the final time.
is_breached
boolean
If SLA Config is set up for the account, this field will indicate whether the request has breached Resolution Time SLA. This field will be absent in case Resolution Time SLA Config is not setup.
Name
Type
Description
value
number
The time difference (in minutes) between when a request message was sent, and when it was resolved for the final time.
is_breached
boolean
If SLA Config is set up for the account, this field will indicate whether the request has breached Resolution Time SLA. This field will be absent in case Resolution Time SLA Config is not setup.
first_response_time
object
This field will hold null
if currently, the request hasn't had a first response in some way or the other.
Name
Type
Description
value
number
The time difference (in minutes) between when the request message was sent, and when it received a first response.
is_breached
boolean
If SLA Config is set up for the account, this field will indicate whether the request has breached the First Response Time SLA. This field will be absent in case First Response Time SLA config is not setup.
Name
Type
Description
value
number
The time difference (in minutes) between when the request message was sent, and when it received a first response.
is_breached
boolean
If SLA Config is set up for the account, this field will indicate whether the request has breached the First Response Time SLA. This field will be absent in case First Response Time SLA config is not setup.
first_resolution_time
object
This field will hold null
if the request has not been marked as solved
at least once.
Name
Type
Description
value
number
The time difference (in minutes) between when a request message was sent, and when it was resolved for the first time.
Name
Type
Description
value
number
The time difference (in minutes) between when a request message was sent, and when it was resolved for the first time.
Collection Object
The collection of a request is represented as a JSON object with the following properties:
id
string
Id of the collection
name
string
name of the collection
Channel Object
Channel of a request is represented as JSON object with the following properties:
id
string
Id of the channel
name
string
name of the channel
owner
string
id of the channel owner
Message Object
The message of a request is represented as a JSON object with the following properties. It is included in the API when the include
query parameter is passed with the value messages
.
text
string
Text content of the message
author
string
Author of the message
ts
string
Id of the message
thread_ts
string
Id of the thread where the message was sent
is_responder
boolean
Indicates whether the message was sent by a responder.
Create Request
POST
https://api.clearfeed.app/v1/rest/requests
Create a new request in ClearFeed.
Request Body
description*
string
The description of the request in HTML format. Max Length: 4000 characters.
title
string
(Optional) The title of the request as plain text. If omitted, a title will be generated using AI. Max Length: 300 characters.
requester_email
string
(Optional) The email of the requester. If omitted, the request will be created on behalf of the user associated with the provided token.
priority
string
(Optional) The priority of the request. If omitted, a priority will be generated using AI. Allowed values: low
, normal
, high
, urgent
.
attachments
file
(Optional) A list of file attachments. Each file must not exceed 100MB in size, and a maximum of 5 files can be uploaded.
Example cURL Request
Response
request
object
Contains the request details
id
string
The ID of the newly created request
Example Response
Notes
Description must be provided in HTML format and should not exceed 4000 characters.
Title and Priority are optional. If not provided, AI will generate them.
If requester_email is not provided, the request will be created on behalf of the authenticated user.
Attachments must adhere to the following constraints:
Maximum file size per attachment: 100MB.
Maximum number of files: 5.
Feature Availability
This API is not enabled for all users by default. To access this feature, contact support at support@clearfeed.ai.
Get Requests
GET
https://api.clearfeed.app/v1/rest/requests
Get all requests in an account
Query Parameters
collection_id
Number
Use the collection_id
parameter to filter requests for a specific collection. Provide the collection's unique identifier to narrow down the results to that collection's requests.
sort_order
String
The sort_order
parameter lets you set the result sorting order. Use 'asc' for ascending and 'desc' for descending. By default, results are sorted in 'desc' order, arranging them from newest to oldest based on creation time.
next_cursor
String
Utilize the next_cursor
parameter to access the next batch of results when paginating. This field will be present under response_metadata
in the previous API response.
limit
Number
Specify the number of results per response (1-100), defaulting to 50.
after
ISO Date
Employ the after
parameter to fetch entities created after the provided ISO8601 date. The default value is None.
before
ISO Date
Use the before
parameter to retrieve entities created before the provided ISO8601 date. The default value is None.
include
Use include query parameter to include more data for each request.
Get Request by ID
GET
https://api.clearfeed.app/v1/rest/requests/:id
Path Parameters
id*
Number
Request Id
Query Parameters
include
string
(Optional) Must be set to the exact value messages
to include the list of associated messages (messages
array) within the response object.
Update Request
PATCH
https://api.clearfeed.app/v1/rest/requests/:id
Updates an existing request. Only the specified fields in the request body will be updated.
Path Parameters
id*
Number
Yes
Request Id
Request Body
All fields are optional; however, at least one must be provided. If no fields are supplied or if all are empty or invalid, the request will fail with a 400 Bad Request error.
state
String
(Optional) New state of the request.
Allowed values :
open
, in_progress
, pending
, on_hold
, solved
, closed
If you attempt to set the state to on_hold
but your account disallows it, you will get a 400 Bad Request.
If the existing state is closed
, you cannot change it (406 Not Acceptable).
assignee
String
(Optional) User ID of the new assignee.
title
String
(Optional) New title for the request, with a minimum length of 1 character and a maximum of 300 characters.
priority
String
(Optional) New priority for the request. Allowed values :
low
, normal
, high
, urgent
custom_field_values
Object
Example Request Body
Custom Field Value Format Guide
The table below outlines the expected value formats when updating custom fields via the custom_field_values
object. Each field type requires a specific format to ensure successful updates.
Single Select
String (Option id)
"1"
Multi Select
Array of strings (option IDs)
["1", "2"]
Text
String
"Customer request details"
Date
ISO 8601 date string
"2024-02-24" (
ISO 8601 Format)
Number
Number (integer or float)
42
, 99.99
User Type
String (user ID)
"user_12345"
Last updated