Collections
Collection Object
Collections are represented as a JSON object with the following properties
id
integer
The ID of the collection.
name
string
The name of the collection.
created_by
string
ID of the user who created the collection.
created_at
string
The creation timestamp of the collection
updated_at
string
The update timestamp of the collection
Config Object
Config is represented as a JSON object with the following properties
story_detection
boolean
Indicates if story detection is enabled
force_story_request
boolean
Indicates if forcing story request is enabled
auto_assign
object
Object containing auto assign information
responders
array
Array of responder objects. The following two types of objects are possible:
Emoji Config Object
Emoji Config is represented as a JSON object with the following properties
emoji_names
object
Object containing configuration for all emojis that are set up at the collection level. It has the following properties. For all emojis set up, there will be a key with the same emoji_name, and the value will be the config object for that emoji.
Each emoji_name object contains:
action: Type of action (
assignorsolved)enabled: Indicates if the action is enabled
action_config: Object with configuration settings
Ticketing Config Object
Ticket Config is represented as a JSON object with the following properties
enabled
boolean
Indicates if the feature is enabled
integration
string
The integration being used
method
object
Object containing method information. emoji: Name of the emoji used (if method is emoji) type: Type of method ("emoji" or "automatic")
CSAT Config Object
CSAT Config is represented as a JSON object with the following properties
enabled
boolean
Indicates if the feature is enabled
trigger_rules
array
Array of trigger rules. If there are no rules selected, then CSAT will be triggered for all REQUESTS. Current possible rules are :
{"name" : "tickets_only"}
trigger_type
string
Type of trigger (automatic or manual)
survey_config
object
Object containing survey configuration information
survey_type: Type of survey (e.g., five_point_rating)
Channel Object
A channel monitored in a collection 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 channels.
id
string
ID of the monitored channel
owner
string
User ID of the primary individual responsible for the channel
name
string
Name of the channel
status
enum
Denotes the status of the channel in the collection. Possible values:
active: Channel belongs to the collection and is being actively monitored.
processing: Channel was added to the collection and last few messages of the channel are being processed.
inactive: Channel belongs to the collection but is not being monitored.
Get Collections
GET https://api.clearfeed.app/v1/rest/collections
Get all collections in your account
Query Parameters
include?
Use the include query parameter to include more data for each collection.
Add Channels to a Collection
POST https://api.clearfeed.app/v1/rest/collections/:id/channels
Start monitoring channels by adding them to a collection.
Path Parameters
id*
Number
ID of the collection to which the channels should be added. Warning: This should be the ID returned by the Get Collections API - and not IDs referenced in ClearFeed Webapp URLs
Channel Object
id*
string
Slack Channel ID of the channel that needs to be added to the collection. See the conversations.list Slack API
owner
string
Slack User ID of the primary individual responsible for the channel.
For Customer-Centric Inbox accounts the channel object looks like the following:
How to check if you are on Customer-Centric Inbox: See this guide to determine which version you are using.
id*
string
Slack Channel ID of the channel that needs to be added to the collection. See the conversations.list Slack API
customer
object
Customer association for the channel. See Customer Object below for details. This is optional in this API. When it's not provided, ClearFeed tries to automatically link the newly monitored channel to an existing customer object based on the domains of the users present in the channel. If no existing customer exists with those domains, ClearFeed will create a new customer object and link it to the channel.
Customer Object
The customer object that can be passed with the channel object for Customer-Centric Inbox accounts can be one of two types:
Existing Customer Object
type*
string
Must be set to "existing"
id*
number
The ID of the existing customer (customer secondary_id). Must be a positive integer.
New Customer Object
type*
string
Must be set to "new"
owner
string
Owner to assign to the new customer record. This will be used as the customer owner during creation. If this field is not provided, we'll set the user calling the API as the owner of the newly created customer object.
domains
array
List of email domains associated with this customer. Must be valid FQDN (Fully Qualified Domain Names). Free domains (e.g., gmail.com, yahoo.com) are not allowed. Defaults to an empty array if not provided.
Sample Payload Format
For Standard (Channel-Based) Management accounts:
For Customer-Centric Inbox accounts:
Example 1: Link channel to existing customer
Example 2: Create new customer
Example 3: Create new customer without domains
Request Body
channels*
Array
This will be an array of channel objects. For Standard accounts, each object contains a Channel ID id and optional owner. For Customer-Centric Inbox accounts, each object must also include a required customer object.
Returned if channels cannot be added. This can happen if:
A channel does not exist in the workspace
A channel exists but is private and not visible to ClearFeed
If any channel in the request cannot be added (e.g., doesn't exist or isn't accessible), the entire request will fail with a 406 error and no channels will be added.
Last updated