API Reference
Webhooks
API endpoints for configuring webhook integrations with Slack, Discord, and custom URLs.
Webhooks let you receive real-time notifications when events occur in UI Inspect.
webhook.list
List all configured webhooks.
| Type | Query |
| Auth | Protected |
webhook.create
Create a new webhook endpoint.
| Type | Mutation |
| Auth | Protected |
Input:
{
name: string;
url: string; // Webhook endpoint URL
type?: "slack" | "discord" | "custom"; // Default: "custom"
events?: string[]; // Event types to subscribe to
}webhook.update
Update an existing webhook.
| Type | Mutation |
| Auth | Protected |
Input:
{
id: string;
name?: string;
url?: string;
enabled?: boolean;
events?: string[];
}webhook.delete
Delete a webhook.
| Type | Mutation |
| Auth | Protected |
Input: { id: string }
webhook.test
Send a test payload to a webhook endpoint.
| Type | Mutation |
| Auth | Protected |
Input: { id: string }
Response:
{
success: boolean;
error?: string;
}Webhook payload
All webhooks receive a JSON payload:
{
"event": "comparison.complete",
"timestamp": "2025-01-15T10:30:00Z",
"data": {
"id": "comparison-uuid",
"projectId": "project-uuid",
"componentName": "homepage",
"status": "pending",
"diffsFound": 3
}
}Supported events
| Event | Description |
|---|---|
comparison.complete | A comparison has finished analyzing |
comparison.failed | A comparison failed to process |
build.complete | A build has finished |
build.failed | A build failed |
baseline.approved | A baseline was approved |
baseline.rejected | A baseline was rejected |