Skip to main content
POST
/
v0
/
validate-webhook
JavaScript
import Avido from 'avido';

const client = new Avido({
  apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
  applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});

const response = await client.validateWebhook.validate({
  body: {
    prompt: 'I lost my card, please block it.',
    testId: '123e4567-e89b-12d3-a456-426614174000',
  },
  signature: 'abc123signature',
  timestamp: '2024-01-01T00:00:00.000Z',
});

console.log(response.valid);
{
  "valid": true
}

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Body

application/json

Raw JSON payload sent by an external webhook, including signature and timestamp. HMAC verification is used for security.

signature
string
required

HMAC signature for the request body.

Example:

"abc123signature"

timestamp
string
required

Timestamp for the request. Accepts unix milliseconds (string/number) and ISO date strings.

Example:

"2024-01-01T00:00:00.000Z"

body
WebhookValidationRequestBody · object
required

The payload received from Avido. Use this in signature verification.

Response

Webhook is valid

Response object indicating whether the webhook was valid.

valid
boolean
required

Indicates if the webhook payload was successfully validated.

Example:

true