Create Webhook - Add Real-Time Event Notifications
Register a new endpoint to receive real-time event notifications from your subscription bot. When payments complete, memberships change, or other events occur, BotSubscription sends HTTP POST requests to your specified URL with event details and a signature for verification.
POST
/v2/projects/{project_id}/integrations/webhooksAuthorization
Bearer TokenRequired
Path Parameters
project_idstringRequired
The unique identifier of the project.
Request Body
urlstringRequired
The destination URL for webhook events.
Request
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/integrations/webhooks" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://myapp.com/webhooks/botsubscription"
}'{
"ok": true,
"request_id": "11111111-1111-1111-1111-111111111111",
"method": "POST",
"path": "/v2/projects/YOUR_PROJECT_ID/integrations/webhooks",
"code": 200,
"message": "Webhook created successfully",
"data": {
"url": "https://myapp.com/webhooks/botsubscription",
"id": "22222222-2222-2222-2222-222222222222",
"secret": "a1b2c3d4e5f6..."
}
}Last updated: