Skip to main content
Use client.webhooks() to read config, update event delivery, inspect logs, and retry failed callbacks. Common fields on every call:
FieldTypeRequiredDescription
instanceIdstringYesInstance ID.
instanceTokenstringYesInstance token.

client.webhooks().get(...)

Reads the current webhook configuration.
var options = InstanceRequestOptions.builder().instanceToken(instanceToken).build();
JsonNode result = client.webhooks().get(GenericInstanceRequest.builder()
    .instanceId(instanceId)
    .instanceToken(instanceToken)
    .build());
// Example: tipagem estrita com DTOs publicados quando disponivel
Return: envelope { code, success, data } with webhook and subscribe (events).

client.webhooks().set(...)

Sets the callback URL and subscribed events.
var options = InstanceRequestOptions.builder().instanceToken(instanceToken).build();
JsonNode result = client.webhooks().set(GenericInstanceRequest.builder()
    .instanceId(instanceId)
    .instanceToken(instanceToken)
    .build());
// Example: tipagem estrita com DTOs publicados quando disponivel
Return: envelope { code, success, data } with configured webhook and events.
FieldTypeRequiredDescription
webhookURLstringYesPublic URL that receives callbacks.
eventsstring[] or stringNoSubscribed events.
Common events: Message, ReadReceipt, Connected, Disconnected, Presence, ChatPresence, HistorySync, GroupParticipantsAdd, GroupParticipantsRemove, All.

client.webhooks().searchLogs(...)

Searches webhook delivery logs.
var options = InstanceRequestOptions.builder().instanceToken(instanceToken).build();
JsonNode result = client.webhooks().searchLogs(GenericInstanceRequest.builder()
    .instanceId(instanceId)
    .instanceToken(instanceToken)
    .build());
// Example: tipagem estrita com DTOs publicados quando disponivel
Return: envelope { code, success, data } with paginated logs (content[], totals).

client.webhooks().getLog(...)

Reads one specific delivery log.
var options = InstanceRequestOptions.builder().instanceToken(instanceToken).build();
JsonNode result = client.webhooks().getLog(GenericInstanceRequest.builder()
    .instanceId(instanceId)
    .instanceToken(instanceToken)
    .build());
// Example: tipagem estrita com DTOs publicados quando disponivel
Return: envelope { code, success, data } with one delivery log (status, payload, attempts, etc.).

client.webhooks().retryLog(...)

Retries a failed delivery.
var options = InstanceRequestOptions.builder().instanceToken(instanceToken).build();
JsonNode result = client.webhooks().retryLog(GenericInstanceRequest.builder()
    .instanceId(instanceId)
    .instanceToken(instanceToken)
    .build());
// Example: tipagem estrita com DTOs publicados quando disponivel
Return: envelope { code, success, data } confirming callback retry.

When to use webhooks

Use webhooks when:
  • your application already has a public URL for callbacks;
  • you want to process events asynchronously in the backend;
  • your integration pipeline already works with HTTP POST.
For bots, dashboards, and apps that need low latency without exposing a URL, prefer Realtime.