Authorize Webhooks

This endpoint allows you to authenticate that your endpoint was triggered by a trusted source (i.e., Similarweb).

Endpoint

https://api.similarweb.com/v1/webhooks/authorize?api_key={{similarweb_api_key}}

Headers

HeaderDescription
X-sw-authorizationThe authorization signature from Similarweb

Parameters

ParameterTypeDescription
api_keyStringYour Similarweb API key (Insert without {{ }} brackets)

Responses

Status CodeDescription
200: OkAuthentication succeeded, your webhook was triggered by Similarweb.
406: NotAcceptableAuthentication failed, your webhook was not triggered by Similarweb.
424: Failed DependencyAuthentication failed. Your webhook was triggered by Similarweb but the authorization token expired. This means that more than 5 minutes have passed since the trigger.

Example Request

curl --location -g --request POST 'https://api.similarweb.com/v1/webhooks/authorize?api_key=YOUR_API_KEY' \
--header 'X-sw-authorization: YOUR_AUTHORIZATION_SIGNATURE'

Replace YOUR_API_KEY with your actual Similarweb API key and YOUR_AUTHORIZATION_SIGNATURE with the authorization signature.