POST
/api/v1/webhooks/subscriptions
Auth: Bearer token
Create Subscription
Creates a webhook subscription for selected event types.
Body parameters
Example response
<?php
return [
'success' => true,
'data' => [
'subscription_id' => 'wh_22',
'status' => 'active',
'url' => 'https://example.com/webhooks/pickndrop',
'events' => [
'shipment.created',
'booking.updated'
],
'createdAt' => '2026-02-17T10:45:00Z'
]
];
Request examples
curl -X POST \
"https://spaces-api-main-rwk71f.laravel.cloud/api/v1/webhooks/subscriptions" \
-H "Authorization: Bearer <token>" \\
-H "Content-Type: application/json" \\
--data '{
"url": "https://example.com/webhooks/pickndrop",
"event": "shipment.updated",
"events": [
"shipment.created",
"booking.updated"
]
}'