Skip to content

Send a test event

POST
/v1/webhooks/{webhook_id}/test
curl --request POST \
--url https://api-staging.asqary.com/v1/webhooks/example/test \
--header 'Authorization: Bearer <token>'

Queues a webhook.test event to this endpoint, even if disabled. It is attempted once, within a few seconds; poll the delivery for the result.

webhook_id
required
string
/^wh_[0-9a-f]{32}$/

Queued

Media typeapplication/json
object
delivery_id
required
string
/^whd_[0-9a-f]{32}$/
webhook_id
required
string
/^wh_[0-9a-f]{32}$/
event_id
required
string
/^evt_[0-9a-f]{32}$/
event_type
required
string
Allowed values: backtest.completed backtest.failed policy.activated policy.archived webhook.test
status
required
string
Allowed values: pending succeeded failed
attempt_count
required
integer
next_attempt_at
required

Set while pending.

string | null format: date-time
last_attempt_at
string | null format: date-time
last_status_code
integer | null
last_error
string | null
succeeded_at
string | null format: date-time
created_at
required
string format: date-time
payload

The JSON body POSTed to your endpoint. Verify the Asqary-Signature header before trusting it (see docs/api.md#webhooks). Deliveries can repeat or arrive out of order; deduplicate on id.

object
id
required
string
/^evt_[0-9a-f]{32}$/
type
required
string
Allowed values: backtest.completed backtest.failed policy.activated policy.archived webhook.test
created_at
required
string format: date-time
environment
required
One of:
string
Allowed values: live test
data
required

backtest.*: backtest_id, status, environment, policy, dataset, summary, error, created_at, completed_at (as in GET /v1/backtest/{id}). policy.activated: policy_id, name, product, version, version_id, was_tested, replaced. policy.archived: policy_id, name, product. webhook.test: webhook_id, message.

object
key
additional properties
any
attempts

Detail only. Most recent first, up to 50.

Array<object>
object
attempted_at
string format: date-time
status_code
integer | null
duration_ms
integer
error
string | null
response_excerpt

First 512 bytes of the response body.

string | null

Example

{
"event_type": "backtest.completed",
"status": "pending",
"payload": {
"type": "backtest.completed",
"environment": "live"
}
}

Missing scope or role, IP not allowed, or monthly quota exceeded (quota_exceeded).

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}

Resource or endpoint not found.

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}