Skip to main content
Use client.Webhooks to configure the URL that receives instance events and to inspect delivery logs.

client.Webhooks.GetAsync<TResponse>(instanceId, options?)

Returns the current webhook configuration for the instance.
await client.Webhooks.GetAsync<object>("VZ...", new InstanceRequestOptions
{
    InstanceToken = "instance-token",
});
Return: envelope { Code, Success, Data } with Webhook and subscribe (events).

client.Webhooks.SetAsync<TResponse>(request)

Sets the webhook URL and subscribed events.
await client.Webhooks.SetAsync<object>(new WebhookSetRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    WebhookURL = "https://example.com/vzaps/webhook",
    Events = new[] { "Message", "Connected", "Disconnected" },
});
Return: envelope { Code, Success, Data } with configured Webhook and Events.

client.Webhooks.SearchLogsAsync<TResponse>(request)

Searches webhook delivery logs.
await client.Webhooks.SearchLogsAsync<object>(new WebhookLogSearchRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
});
Return: envelope { Code, Success, Data } with paginated logs (content[], totals).

client.Webhooks.GetLogAsync<TResponse>(request)

Reads a specific log.
await client.Webhooks.GetLogAsync<object>(new WebhookLogRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    LogId = "log_123",
});
Return: envelope { Code, Success, Data } with one delivery log (status, payload, attempts, etc.).

client.Webhooks.RetryLogAsync<TResponse>(request)

Retries a delivery registered in the log.
await client.Webhooks.RetryLogAsync<object>(new WebhookLogRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    LogId = "log_123",
});
Return: envelope { Code, Success, Data } confirming callback retry.

When to use webhooks

Use webhooks for persistent server-to-server integration. Use Realtime when your process needs to keep an active WebSocket connection and handle events in real time.