API
Learn how to create ClearFeed tickets programmatically using the API
ClearFeed provides REST API endpoints to create and manage tickets programmatically. This allows you to integrate ClearFeed ticketing into your existing tools, workflows, and automation systems.
When to Use the API
Use the ClearFeed API to create tickets when:
Integrating with internal tools - Connect your custom applications to ClearFeed
Automating ticket creation - Create tickets from monitoring systems, webhooks, or scheduled jobs
Bulk operations - Create or update multiple tickets programmatically
Custom workflows - Build custom ticketing flows for your specific needs
Third-party integrations - Connect services that don't have native ClearFeed integration
Setup API Collection
Before using the API, you need to create an API Collection to manage API-based tickets.
Step 1: Create API Collection
Go to Collections → Click Add New Collection
Select API Collection
Configure the Collection settings:
Name - Give your API Collection a descriptive name
Add Responders - Select users who will respond to these tickets
Select Request Channel - Choose the Slack channel where API tickets will be posted
For private channels, follow the channel management guide
(Optional) Associate Triage Channel - Link or create a triage channel for team visibility
Learn more: Triage Channel Setup
Enable Workflows (Optional) - Set up alerts for unattended tickets
Learn more: Workflows Guide
Step 2: Get API Credentials
Navigate to Settings → Developer Settings
Generate or copy your API Key
Store the API key securely - you'll need it for API requests Learn More: Developer Settings
Creating Tickets via API
API Endpoint
Use the Create Request API endpoint to create new tickets:
POST https://api.clearfeed.ai/v1/requestsAPI Documentation: Create Request API Reference
Request Format
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonBody:
{
"collection_id": "col_abc123",
"title": "API ticket title",
"description": "Detailed description of the issue",
"priority": "high",
"requester_email": "[email protected]",
"custom_fields": {
"environment": "production",
"severity": "critical"
}
}Required Fields:
collection_id- The ID of your API Collectiontitle- Ticket title/subjectdescription- Detailed description of the issue
Optional Fields:
priority- Ticket priority (low, medium, high, urgent)requester_email- Email of the person requesting supportassignee_id- User ID to assign the ticket tocustom_fields- Additional metadata as key-value pairstags- Array of tags for categorization
Example: Create Ticket with cURL
curl -X POST https://api.clearfeed.ai/v1/requests \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"collection_id": "col_abc123",
"title": "Production API Error - 500 responses",
"description": "Users are experiencing 500 errors when accessing the /api/orders endpoint. Started approximately 30 minutes ago.",
"priority": "urgent",
"requester_email": "[email protected]",
"custom_fields": {
"environment": "production",
"service": "orders-api",
"error_rate": "25%"
}
}'Example: Create Ticket with Python
import requests
url = "https://api.clearfeed.ai/v1/requests"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"collection_id": "col_abc123",
"title": "Production API Error - 500 responses",
"description": "Users are experiencing 500 errors when accessing the /api/orders endpoint.",
"priority": "urgent",
"requester_email": "[email protected]",
"custom_fields": {
"environment": "production",
"service": "orders-api",
"error_rate": "25%"
}
}
response = requests.post(url, json=data, headers=headers)
print(response.json())Response
Successful ticket creation returns:
{
"id": "req_xyz789",
"ticket_id": "CF-12345",
"collection_id": "col_abc123",
"title": "Production API Error - 500 responses",
"status": "open",
"priority": "urgent",
"created_at": "2025-01-15T10:30:00Z",
"slack_thread_url": "https://yourworkspace.slack.com/archives/C123/p1234567890"
}What Happens After Creating a Ticket
Once you create a ticket via API:
Ticket is posted to Slack - A message appears in the configured Request Channel
Team notification - Responders receive Slack notifications
Ticket ID assigned - A unique ClearFeed ticket ID is generated (e.g., CF-12345)
Tracking begins - The ticket is tracked in the ClearFeed system
Team can respond - Responders reply in the Slack thread to manage the ticket
Managing Tickets via API
Beyond creating tickets, the ClearFeed API supports:
Update tickets - Modify status, priority, assignee
Get ticket details - Retrieve ticket information
Add comments - Post updates to tickets programmatically
Search tickets - Query tickets by various criteria
Close tickets - Mark tickets as resolved
Full API Documentation: ClearFeed API Reference
FAQs
How do I get my API credentials? Answer: Navigate to Settings → Developer Settings in the ClearFeed web app to generate your API key.
Is there a rate limit for API requests? Answer: Yes, API rate limits apply. Refer to the API Documentation for current rate limits and best practices.
Can I create tickets in multiple Collections using the same API key? Answer: Yes, the API key is workspace-level. Specify different
collection_idvalues to create tickets in different Collections.How do I specify who the ticket is assigned to? Answer: Include the
assignee_idfield in your API request with the user's ID. You can get user IDs from the ClearFeed API or web appWhat happens if the API request fails? Answer: The API returns appropriate HTTP status codes and error messages. Implement error handling in your code to retry or log failures.
Can I update an existing ticket via API? Answer: Yes, use the Update Request endpoint. See API Documentation for details.
Are webhooks available to receive ticket updates? Answer: Yes, ClearFeed supports webhooks for ticket events. Configure them in Settings → Developer Settings → Webhooks.
Last updated
