Webhooks

Set webhook OAuth credentials

Configure OAuth 2.0 credentials for authenticating webhook callbacks to your endpoints.

When you provide a callbackUrl in estimate requests, we will:

  1. Request an access token from your OAuth server using these credentials
  2. Include the token in the Authorization: Bearer <token> header

Security:

  • Client secrets are stored securely encrypted
  • Tokens are cached and automatically refreshed
  • Only client_credentials grant type is supported
put/v1/webhook/oauth

Request

  • Base URL: https://api.handoff.ai
  • URL: https://api.handoff.ai/v1/webhook/oauth
  • Auth: HTTP bearer

Request body

clientIdstring required

OAuth client ID for your webhook endpoint's auth server

clientSecretstring required

OAuth client secret (stored securely encrypted)

tokenEndpointUrlstring uri required

OAuth token endpoint URL

scopestring

Space-separated scopes to request (optional)

audiencestring

Audience/resource identifier for Auth0, etc. (optional)

grantType'client_credentials' required

OAuth grant type (only client_credentials is supported)

Example request

{
  "clientId": "webhook-client-123",
  "clientSecret": "secret_xxxxxxxxxxxxx",
  "tokenEndpointUrl": "https://auth.example.com/oauth/token",
  "scope": "webhooks:receive",
  "audience": "https://api.example.com",
  "grantType": "client_credentials"
}

Response

OAuth credentials configured successfully

clientIdstring required

OAuth client ID

tokenEndpointUrlstring uri required

OAuth token endpoint URL

scopestring nullable required

Space-separated OAuth scopes

audiencestring nullable required

OAuth audience/resource identifier

grantTypestring required

OAuth grant type

enabledboolean required

Whether OAuth webhook authentication is enabled

Example response

{
  "clientId": "webhook-client-123",
  "tokenEndpointUrl": "https://auth.example.com/oauth/token",
  "scope": "webhooks:receive",
  "audience": "https://api.example.com",
  "grantType": "client_credentials",
  "enabled": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.