Skip to main content

Create webhook

POST /api/webhooks

Register an account endpoint. Registered deliveries are signed with HMAC-SHA256(secret, timestamp + "." + raw body). There are at most 5 total attempts (initial plus retries after 30, 60, 120 and 240 seconds), a 10-second HTTP timeout, and no redirect following. Endpoints are disabled after 20 consecutive exhausted deliveries. Creation and GET by ID return the signing secret.

Authentication​

  • Option 1: x-api-key: YOUR_API_KEY (header). API key for authentication. Create one in your dashboard.
  • Option 2: Authorization: Bearer YOUR_ACCESS_TOKEN. Dashboard JWT in Authorization: Bearer <token>, only on operations that explicitly list this scheme. Prefer x-api-key for REST integrations. OAuth for hosted MCP is a separate connection at https://mcp.zvid.io/mcp.

Create API keys at app.zvid.io/api-keys. Keep credentials on your server.

Parameters​

This operation has no path, query, or additional header parameters.

Request​

The shell examples read credentials from ZVID_API_KEY (or ZVID_ACCESS_TOKEN for Bearer authentication). Set that variable in your environment. Replace sample project, template, job, and asset identifiers with values from your own account.

A request body is required.

application/json​

Unknown properties are rejected. Required properties: url.

FieldTypeRequiredDescription and constraints
body.urlstringYesMaximum length: 2048. Format: uri.
body.descriptionstringNoMaximum length: 255.
body.eventsarray of "render.completed" / "render.failed"NoMinimum items: 1. Items must be unique.

Nested field: body.events

Minimum items: 1. Items must be unique.

Array item: body.events[]

Type: "render.completed" / "render.failed".

Request example: endpoint​

curl --request POST 'https://api.zvid.io/api/webhooks' \
--header "x-api-key: $ZVID_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/hooks/zvid",
"events": [
"render.completed",
"render.failed"
]
}'

Responses​

HTTP 201​

Webhook created (includes secret)

Content type: application/json.

Required properties: id, url, events, status.

FieldTypeRequiredDescription and constraints
response.idstringYes
response.urlstringYes
response.descriptionstringNo
response.eventsarray of "render.completed" / "render.failed"Yes
response.status"active" / "disabled"Yes
response.secretstringNoReturned by creation and single-webhook lookup; omitted from list/update responses.
response.consecutiveFailuresintegerNo
response.lastSuccessAtstring OR nullNoAt least one listed alternative must match.
response.lastFailureAtstring OR nullNoAt least one listed alternative must match.
response.lastFailureReasonstring OR nullNoAt least one listed alternative must match.
response.createdAtstringNo
response.updatedAtstringNo

Nested field: response.events

Array item: response.events[]

Type: "render.completed" / "render.failed".

Nested field: response.lastSuccessAt

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

Nested field: response.lastFailureAt

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

Nested field: response.lastFailureReason

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

Representative successful response response

{
"id": "whk_abcdefghijklmnopqrst",
"url": "https://example.com/hooks/zvid",
"events": [
"render.completed"
],
"status": "active",
"secret": "whsec_example_not_a_real_secret",
"created": true
}

HTTP 400​

Invalid URL (the hosted API requires a public HTTPS address and rejects private hosts)

Content type: application/json.

Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYes
response.messagestringNo
response.detailsarray of objectNo
response.planLimitsobjectNoPresent on render validation errors; contains the authenticated user's current render limits.

Nested field: response.details

Array item: response.details[]

Unknown properties are rejected. Required properties: field, message.

FieldTypeRequiredDescription and constraints
response.details[].fieldstringYes
response.details[].messagestringYes

HTTP 401​

Unauthorized

Content type: application/json.

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type
response.messagestringNoHuman-readable error message

Schema definitions​

The following definitions describe the fields referenced above. Expand a definition to inspect its complete contract.

WebhookRequest

Unknown properties are rejected. Required properties: url.

FieldTypeRequiredDescription and constraints
WebhookRequest.urlstringYesMaximum length: 2048. Format: uri.
WebhookRequest.descriptionstringNoMaximum length: 255.
WebhookRequest.eventsarray of "render.completed" / "render.failed"NoMinimum items: 1. Items must be unique.

Nested field: WebhookRequest.events

Minimum items: 1. Items must be unique.

Array item: WebhookRequest.events[]

Type: "render.completed" / "render.failed".

Webhook

Required properties: id, url, events, status.

FieldTypeRequiredDescription and constraints
Webhook.idstringYes
Webhook.urlstringYes
Webhook.descriptionstringNo
Webhook.eventsarray of "render.completed" / "render.failed"Yes
Webhook.status"active" / "disabled"Yes
Webhook.secretstringNoReturned by creation and single-webhook lookup; omitted from list/update responses.
Webhook.consecutiveFailuresintegerNo
Webhook.lastSuccessAtstring OR nullNoAt least one listed alternative must match.
Webhook.lastFailureAtstring OR nullNoAt least one listed alternative must match.
Webhook.lastFailureReasonstring OR nullNoAt least one listed alternative must match.
Webhook.createdAtstringNo
Webhook.updatedAtstringNo

Nested field: Webhook.events

Array item: Webhook.events[]

Type: "render.completed" / "render.failed".

Nested field: Webhook.lastSuccessAt

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

Nested field: Webhook.lastFailureAt

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

Nested field: Webhook.lastFailureReason

At least one listed alternative must match.

anyOf alternative 1

Type: string.

anyOf alternative 2

Type: null.

ValidationError

Required properties: error.

FieldTypeRequiredDescription and constraints
ValidationError.errorstringYes
ValidationError.messagestringNo
ValidationError.detailsarray of objectNo
ValidationError.planLimitsobjectNoPresent on render validation errors; contains the authenticated user's current render limits.

Nested field: ValidationError.details

Array item: ValidationError.details[]

Unknown properties are rejected. Required properties: field, message.

FieldTypeRequiredDescription and constraints
ValidationError.details[].fieldstringYes
ValidationError.details[].messagestringYes
AuthenticationError

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
AuthenticationError.errorstringYesError type
AuthenticationError.messagestringNoHuman-readable error message