Help CenterVying
Open Vying
Menu

Create a Webhook

POST/webhooks

Create an outbound webhook subscription. Returns the generated signing secret once.

Needs write access. About keys

Request

curl -X POST "https://app.vyingfor.com/api/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Results alerts","url":"https://example.com/vying-events","preset":"json","events":["report.ready"]}'

Body

FieldTypeDescription
organizationIdstring

Optional. If you send it, it must be your key's own workspace.

brandIdstring or null

Optional brand ID to scope this webhook to a single brand; null targets all brands in the organization. A key limited to some brands must name one of them here.

name requiredstring

Display name for the webhook. Between 1 and 120 characters.

url requiredstring

Public HTTPS endpoint URL. An https address on a public server, up to 2,048 characters, with no username or password in it.

preset required"json" | "slack" | "teams"

Payload formatting preset.

events required("report.ready" | "action.verdict_settled" | "visibility.alert" | "sentiment.alert" | "webhook.test")[]

Subscribed event types. At least one event.

enabledboolean

Whether the webhook starts enabled (defaults to true).

Response

201 Webhook subscription created

FieldTypeDescription
idstring

Unique identifier for the webhook subscription.

organizationIdstring

Organization identifier that owns this webhook.

brandIdstring or null

Brand identifier when scoped to a single brand, or null for all brands in the organization.

namestring

Display name for the webhook.

urlstring

HTTPS destination URL (port 443, public IP only).

preset"json" | "slack" | "teams"

Payload formatting preset.

events("report.ready" | "action.verdict_settled" | "visibility.alert" | "sentiment.alert" | "webhook.test")[]

Subscribed event types.

secretLastFourstring

Last four characters of the current HMAC signing secret.

enabledboolean

Whether the webhook receives live events.

consecutiveFailuresinteger

Consecutive terminal delivery failures since the last successful delivery or URL/enable reset.

disabledReasonstring or null

Automatic disablement reason when the circuit breaker trips, or null.

lastFailureAtstring or null

Timestamp of the most recent terminal delivery failure, or null.

createdByUserIdstring or null

User ID of the creator when created from the dashboard. Null when the webhook was made through the API.

createdAtstring

Timestamp when the webhook was created.

updatedAtstring

Timestamp when the webhook was last updated.

signingSecretstring

One-time plaintext HMAC signing secret (only returned on creation and secret rotation).

Errors