cURL
curl --request POST \ --url https://api.bunship.com/api/v1/organizations/{orgId}/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "url": "<string>", "description": "<string>", "events": [ "<string>" ] } '
{ "success": true, "data": { "id": "wh_abc123", "organizationId": "org_cld2abc123def456", "url": "https://example.com/webhooks/bunship", "description": "Production webhook handler", "events": ["member.added", "member.removed"], "secret": "whsec_abc123def456...", "isActive": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" } }
Register a new webhook endpoint
curl -X POST https://api.bunship.com/api/v1/organizations/org_cld2abc123def456/webhooks \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhooks/bunship", "description": "Production webhook handler", "events": ["member.added", "member.removed"] }'