Skip to content

Get webhook settings

Returns whether a webhook is configured for the survey, and its target URL.

HTTP request

GET https://www.asqiro.com/api/v1/surveys/{id}/webhook

Any API key in the survey's workspace.

Path parameters

ParameterTypeDescription
idstringThe survey id, as returned by the surveys endpoints.Required

Response body

FieldTypeDescription
enabledbooleanWhether a webhook is currently configured for this survey.
targetUrlstring· nullableThe URL receiving events, or null when no webhook is configured.
Note The signing secret is never returned here. If you have lost it, set the webhook again to receive a new one.

Errors

  • unauthorized · 401 · The API key is missing, malformed, deleted, or its creator lost workspace access. Check the Authorization header, then the key itself.
  • forbidden · 403 · The key is valid but lacks the access this call needs - most often a read-only key attempting a write.
  • not_found · 404 · No survey with that id is reachable by this key. A survey in another workspace answers the same way as one that does not exist.
  • plan_upgrade_required · 403 · The workspace owner's plan does not include API access. Upgrading the plan restores it; retrying will not.
  • rate_limited · 429 · Too many requests. The Retry-After response header carries the number of seconds to wait.

Example request

bash
curl "https://www.asqiro.com/api/v1/surveys/s_7t2qk8wvbf31/webhook" \
  -H "Authorization: Bearer $ASQIRO_API_KEY"

Returns 200 on success.

Example response
json
{
  "enabled": true,
  "targetUrl": "https://hooks.example.com/asqiro"
}