- Callback Holds
- Create Callback Holds
Callback Holds
Create Callback Holds
Place holds on specific message types to suspend callback delivery
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/callback_holds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"message_types": "<value>"
}'Create callback holds to temporarily suspend delivery of specific message types to your webhook endpoints. This is useful during maintenance windows, system upgrades, or debugging.
Events that occur while holds are active will not be queued for later delivery. Once you remove the hold, only new events will be delivered.
Request Body
The request body accepts an array of message type strings to place on hold.
Array of message types to place on hold. Common types include:
skuInventoryChange- Inventory level changesorderEvent- Order status and lifecycle eventsshipmentEvent- Shipment tracking updatesinboundReceived- Inbound shipment receipts
curl -X POST "https://app.masonhub.co/{account}/api/v1/callback_holds" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[
"skuInventoryChange",
"orderEvent"
]'
{
"status": "success",
"holds_created": [
"skuInventoryChange",
"orderEvent"
],
"total_holds": 2
}
Response Fields
Status of the operation. Returns success when holds are created.
Array of message types that were successfully placed on hold.
Total number of active holds after this operation.
Behavior
Idempotent Operations
If you create a hold for a message type that’s already on hold, the API will acknowledge it without error but won’t create a duplicate.
Multiple Message Types
You can place holds on multiple message types in a single request. The API processes them atomically - either all succeed or none are created.
Event Impact
Events that occur during a hold period are not delivered and not queued. They are effectively skipped. Plan your hold periods accordingly.
Use Cases
Scheduled Maintenance
Place holds before planned maintenance windows to prevent failed delivery attempts.
System Deployment
Suspend events during application deployments to avoid processing errors.
Load Testing
Control event flow during load testing or performance tuning.
Emergency Response
Quickly suspend events when detecting issues with your webhook processing.
Best Practices
Plan Hold Windows
Schedule holds during low-activity periods when possible to minimize lost events.
Document Hold Periods
Keep records of when holds are active for troubleshooting and auditing.
Test in Sandbox
Test callback hold behavior in sandbox environment before using in production.
Remove Promptly
Remove holds as soon as maintenance is complete to resume event delivery.
Remember to remove holds using the Delete Callback Holds endpoint when you’re ready to resume event delivery.
Example Workflow
# Place holds before maintenance
hold_types = ["skuInventoryChange", "orderEvent"]
requests.post(
f"{base_url}/callback_holds",
headers=headers,
json=hold_types
)
# Perform maintenance tasks
perform_system_maintenance()
# Remove holds after maintenance
requests.delete(
f"{base_url}/callback_holds",
headers=headers,
json=hold_types
)
curl -X POST "https://app.masonhub.co/{account}/api/v1/callback_holds" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[
"skuInventoryChange",
"orderEvent"
]'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/callback_holds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"message_types": "<value>"
}'{
"status": "success",
"holds_created": [
"skuInventoryChange",
"orderEvent"
],
"total_holds": 2
}