API reference / webhooks
Create webhook endpoint
POST
/v1/webhooksPermission webhooks:manageSubscribes a URL to workspace publishing and channel lifecycle events.
Headers
AuthorizationstringREQUIREDBearer followed by your API key.
Foxli-WorkspacestringTarget workspace ID. Required if account owns or admins more than one workspace.
Idempotency-KeystringUnique token for request idempotency (valid for 24 hours).
Query parameters
workspace_idstringAlternative way to pass workspace ID.
Body parameters
urlstringREQUIREDeventsstring[]REQUIREDErrors
400
validation_failedInvalid parameters or missing workspace context.401
invalid_api_keyMissing, invalid, or revoked API key.403
insufficient_scopeAPI key lacks required scope: webhooks:manage429
rate_limitedToo many requests. Check Retry-After seconds.curl -X POST https://api.foxli.app/v1/webhooks \ -H "Authorization: Bearer $FOXLI_API_KEY" \ -H "Foxli-Workspace: ws_brand_primary" \ -H "Idempotency-Key: idemp_9f82a1" \ -H "Content-Type: application/json" \ -d '{ "url": "https://agency.example.com/api/foxli-events", "events": [ "post.published", "post.failed" ] }'
Response201 OK
{
"success": true
}