1. Callbacks
  2. Get Callback URLs
GET
/callbacks
curl --request GET \
     --url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/callbacks \
     --header 'Authorization: Bearer <token>'

Retrieve all registered webhook callback URLs, optionally filtered by message type. Use this endpoint to view and audit your current webhook subscriptions.

Filter by specific message types to reduce response size, or use message_type=all to retrieve all callbacks at once.

​
Query Parameters

message_type
default:all
string

Filter callbacks by message type. Use all to retrieve all callbacks regardless of type.

​
Available Message Types

curl -X GET "https://app.masonhub.co/{account}/api/v1/callbacks?message_type=skuInventoryChange" \
  -H "Authorization: Bearer your_jwt_token"
[
  {
    "id": "callback-uuid-123",
    "url": "https://api.clienturl.com/api/inventory_event",
    "message_type": "skuInventoryChange",
    "api_version": "1.0",
    "token": "encrypted_verification_token",
    "created_at": "2018-08-01T10:30:00Z"
  },
  {
    "id": "callback-uuid-456",
    "url": "https://api.clienturl.com/api/order_event",
    "message_type": "orderEvent",
    "api_version": "1.0",
    "token": "encrypted_verification_token",
    "created_at": "2018-08-01T10:35:00Z"
  }
]

​
Response Fields

Each callback object in the response includes:

FieldTypeDescription
idstringUnique callback UUID for future operations
urlstringHTTPS webhook endpoint URL
message_typestringEvent type this callback is subscribed to
api_versionstringAPI version for callback payloads
tokenstringEncrypted verification token (if configured)
created_atstringRegistration timestamp in RFC3339 format

​
Callback Payload Format

When events occur, MasonHub sends POST requests to registered URLs with this structure:

{
  "callback_url": "https://client.com/api/webhook",
  "message_type": "eventType",
  "message_id": "unique-event-id",
  "api_version": "1.0",
  "data": [
    {
      // Event-specific data
    }
  ]
}

​
Use Cases

  • Audit Callbacks

  • Verify Registration

  • Get Callback IDs

Periodically fetch all callbacks to ensure your webhook configuration is up to date:

GET /callbacks?message_type=all

Review the list and remove any callbacks pointing to decommissioned endpoints.

​
Best Practices

Use message_type=all during initial setup to get a complete view of all your webhook subscriptions.