Webhooks
Update Webhook Partner
Update a webhook partner’s configuration
PATCH
/
stocks
/
api
/
webhooks
/
partners
/
{partnerId}
curl -X PATCH "https://api.trusset.org/stocks/api/webhooks/partners/wh_abc123" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
}'
const response = await fetch(
`https://api.trusset.org/stocks/api/webhooks/partners/${partnerId}`,
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
webhookUrl: 'https://api.example.com/webhooks/trusset-v2',
active: true
})
}
);
const { data } = await response.json();
{
"success": true,
"data": {
"id": "wh_abc123",
"name": "Settlement System",
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Partner not found"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
Updates the configuration of a registered webhook partner. Only the owning instance can modify a partner. The webhook URL, if updated, must use HTTPS.
Path Parameters
string
required
ID of the webhook partner to update.
Request Body
Accepts any combination of updatable fields. Only provided fields are changed.string
Updated display name.
string
Updated HTTPS delivery URL.
boolean
Set to
false to disable webhook delivery without deleting the registration.Response Fields
boolean
Request status.
object
curl -X PATCH "https://api.trusset.org/stocks/api/webhooks/partners/wh_abc123" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
}'
const response = await fetch(
`https://api.trusset.org/stocks/api/webhooks/partners/${partnerId}`,
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
webhookUrl: 'https://api.example.com/webhooks/trusset-v2',
active: true
})
}
);
const { data } = await response.json();
{
"success": true,
"data": {
"id": "wh_abc123",
"name": "Settlement System",
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Partner not found"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
⌘I
curl -X PATCH "https://api.trusset.org/stocks/api/webhooks/partners/wh_abc123" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
}'
const response = await fetch(
`https://api.trusset.org/stocks/api/webhooks/partners/${partnerId}`,
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
webhookUrl: 'https://api.example.com/webhooks/trusset-v2',
active: true
})
}
);
const { data } = await response.json();
{
"success": true,
"data": {
"id": "wh_abc123",
"name": "Settlement System",
"webhookUrl": "https://api.example.com/webhooks/trusset-v2",
"active": true
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Partner not found"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:00:00.000Z",
"instanceId": "inst_abc123"
}
}
