cURL
curl --request POST \
--url https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE",
"scenario": "filed"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhookType: 'SURPLUS_LINES_FILING_STATUS_CHANGE', scenario: 'filed'})
};
fetch('https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test"
payload = {
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE",
"scenario": "filed"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"scenario": "filed",
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Webhooks
Send Test Event
Fire a real, signed test delivery of a sample payload to a registered webhook
POST
/
v2
/
upstream
/
webhooks
/
{webhookId}
/
test
cURL
curl --request POST \
--url https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE",
"scenario": "filed"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhookType: 'SURPLUS_LINES_FILING_STATUS_CHANGE', scenario: 'filed'})
};
fetch('https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/webhooks/{webhookId}/test"
payload = {
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE",
"scenario": "filed"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"scenario": "filed",
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Enqueues a real, HMAC-signed test delivery of a realistic sample payload to a webhook’s registered URL. The delivery is shaped exactly like a production event and carries
"test": true in the envelope, so it never mixes with your real events. The webhook must belong to your upstream entity. Use List Webhooks to find the webhookId.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | Unique identifier of the webhook to test (MongoDB ObjectId) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
scenario | string | No | Scenario key to sample. Must be a valid key for the webhook’s type. Omit to use the type default. |
Scenario keys by webhook type
| Webhook type | Scenario keys (default first) |
|---|---|
AGENT_COMPLIANCE_STATUS_CHANGE | COMPLIANT, NOT_COMPLIANT |
DOWNSTREAM_ENTITY_COMPLIANCE_STATUS_CHANGE | COMPLIANT, NOT_COMPLIANT |
DOWNSTREAM_ENTITY_CREATED | child, root |
DOWNSTREAM_ENTITY_DELETED | archived, removed |
DOWNSTREAM_ENTITY_UPDATED | legalName, branchName |
AML_OFAC_CHECK_STATUS_CHANGE | clear, hit |
ENTITY_COMPLIANCE_DATA_SYNCHRONIZED | success, NIPR error |
PRODUCER_AGREEMENT_EXECUTED | executed |
SURPLUS_LINES_FILING_STATUS_CHANGE | in progress, ready to file, filed, completed, on hold |
SURPLUS_LINES_FILING_ACTION_REQUIRED | waiting customer input |
# Default scenario for the webhook's type
POST /v2/upstream/webhooks/6650a1b2c3d4e5f6a7b8c9d0/test
# A specific surplus lines filing status
POST /v2/upstream/webhooks/6650a1b2c3d4e5f6a7b8c9d0/test
{ "scenario": "filed" }
Response Shape
All successful responses are wrapped in the standard response envelope. See Request/Response Conventions.
{
"statusCode": 200,
"data": {
"scenario": "filed",
"webhookType": "SURPLUS_LINES_FILING_STATUS_CHANGE"
},
"timestamp": "2025-06-01T12:05:00.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
scenario | string | The scenario key that was delivered (the resolved default when none was requested) |
webhookType | string | Event type of the webhook the test was delivered to |
The response confirms the delivery was enqueued. The actual signed POST arrives at your registered URL moments later. Inspect the delivery history in the Turris Web App to see the outcome.
Error Scenarios
Bad Request (400)
Returned whenwebhookId is not a valid MongoDB ObjectId, or scenario is not a valid key for the webhook’s type.
{
"statusCode": 400,
"errorType": "validation_error",
"errorMessage": ["Invalid scenario 'bogus' for webhook type SURPLUS_LINES_FILING_STATUS_CHANGE"],
"requestId": "dev-abc123",
"timestamp": "2025-06-01T12:00:00.000Z"
}
Unauthorized (401)
Missing or invalid authentication token. See Authentication.Webhook Not Found (404)
Returned when the webhook does not exist or belongs to a different upstream entity.{
"statusCode": 404,
"errorType": "not_found",
"errorMessage": ["Webhook 6650a1b2c3d4e5f6a7b8c9d0 not found"],
"requestId": "dev-abc123",
"timestamp": "2025-06-01T12:00:00.000Z"
}
Too Many Requests (429)
Returned when you exceed the test-send rate limit. Space out your test calls and retry.Authorizations
bearerrestricted-access-token
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the webhook to test
Example:
"6650a1b2c3d4e5f6a7b8c9d0"
Body
application/json
Which event type to sample. Must be one of the event types this webhook is subscribed to, otherwise the request is rejected.
Available options:
AGENT_COMPLIANCE_STATUS_CHANGE, AGENT_LICENSE_EXPIRED, AGENT_LICENSE_EXPIRING, AGENT_REGULATORY_ACTION_ADDED, AGENT_REGULATORY_ACTION_UPDATED, AML_OFAC_CHECK_STATUS_CHANGE, DILIGENT_EFFORT_REQUEST_STATUS_CHANGE, DOWNSTREAM_ENTITY_COMPLIANCE_STATUS_CHANGE, DOWNSTREAM_ENTITY_CREATED, DOWNSTREAM_ENTITY_DELETED, DOWNSTREAM_ENTITY_LICENSE_EXPIRED, DOWNSTREAM_ENTITY_LICENSE_EXPIRING, DOWNSTREAM_ENTITY_REGULATORY_ACTION_ADDED, DOWNSTREAM_ENTITY_REGULATORY_ACTION_UPDATED, DOWNSTREAM_ENTITY_UPDATED, ENTITY_COMPLIANCE_DATA_SYNCHRONIZED, PRODUCER_AGREEMENT_EXECUTED, SURPLUS_LINES_FILING_STATUS_CHANGE, SURPLUS_LINES_FILING_ACTION_REQUIRED Example:
"SURPLUS_LINES_FILING_STATUS_CHANGE"
Scenario key to sample. Must be a valid key for the webhook type (see the webhook type reference). Omit to use the type default.
Example:
"filed"
Was this page helpful?