Documentation Index
Fetch the complete documentation index at: https://docs.uip.digital/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Webhooks let your application receive real-time notifications for specific UIP events. UIP sends a POST request to your configured webhook URL with a cryptographically signed JSON payload.Webhooks are only used for:
- Message API — when a user signs or declines a signature-required message
- Webhook testing — when you call the test endpoint
GET /v1/identify/:id or GET /v1/sign/:id instead.Setting up webhooks
1. Configure the webhook URL
- Log into the Business Dashboard
- Open Settings > Webhooks
- Enter your webhook endpoint URL (HTTPS in production)
- Save
2. Retrieve the webhook secret
Your webhook secret is used to verify that requests came from UIP and weren’t tampered with in transit.- In the dashboard, go to Settings > Webhooks
- Copy your Webhook Secret (shown after saving your webhook URL)
- Store it in your application’s environment variables
Verifying webhook signatures
Every webhook request includes anX-UIP-Signature header containing an HMAC SHA-256 signature. You must verify this signature to ensure requests are from UIP.
Algorithm
- Get the
X-UIP-Signatureheader from the request - Calculate HMAC SHA-256 of the raw request body using your webhook secret
- Compare the calculated signature with the header value
- Reject the request if signatures don’t match
Implementation examples
Webhook events
Event: message
Sent when a user signs or declines a signature-required message via the Message API.
signing_uip_id— UIP ID of the user who signed or declinedmessage_id— Message ID from your original requestaudit_id— Permanent audit trail reference (save for compliance)
Determining action: The webhook structure is identical for both signed and declined messages. Query the Audit API using the
audit_id to determine the outcome.Event: test
Sent when you test your webhook configuration via the Test Webhook endpoint.
When webhooks are sent
Message API
Message API
Webhook sent when: User signs or declines a signature-required message (
signature_required: true)No webhook sent when:- Message does not require signature (
signature_required: false) - User doesn’t respond and the signature window expires
- Message is invalidated before the user responds
Test Webhook
Test Webhook
Webhook sent when: You call the Test Webhook endpointPurpose: Verify your webhook configuration before production use
Best practices
Always verify signatures
Validate the
X-UIP-Signature header on every request to prevent spoofing and tamperingReturn 200 quickly
Process webhooks asynchronously and return 200 immediately to avoid timeouts
Store audit IDs
Save
audit_id from every webhook for permanent proof, compliance, and legal verificationHandle idempotency
UIP may send the same webhook multiple times. Use
audit_id or message_id to detect duplicatesUse HTTPS
Production webhook URLs must use HTTPS. HTTP is not allowed for security reasons.
Test before production
Use the Test Webhook endpoint during development to verify your setup works correctly
Error handling
If your webhook endpoint returns an error (non-2xx status code) or times out, UIP will retry the webhook with exponential backoff. Retry schedule: UIP retries webhook delivery once after a short delay. If both attempts fail, the webhook is marked as failed.- Attempt 1: Immediate
- Attempt 2: After a short delay
Webhook handler template
Troubleshooting
Webhook unreachable error
Webhook unreachable error
Problem: API requests fail with
request/webhook-unreachable errorCauses:- Webhook URL is not publicly accessible
- Firewall blocking UIP servers
- Webhook handler not returning 200 status code
- HTTPS certificate issues
- Verify webhook URL is publicly accessible
- Check firewall rules allow incoming requests
- Ensure webhook returns 200 status for all events
- Use a valid HTTPS certificate
Invalid signature
Invalid signature
Problem: Webhook receives requests but signature validation failsCauses:
- Using wrong webhook secret
- Calculating signature on a modified body
- Character encoding issues
- Copy the webhook secret from the dashboard settings
- Calculate the signature on the raw request body (before parsing)
- Use UTF-8 encoding for all strings
Webhook not configured
Webhook not configured
Problem: API requests fail with
request/webhook-missing errorCauses:- No webhook URL configured in the dashboard
- Webhook URL field is empty
- Log into the dashboard
- Navigate to Settings > Webhooks
- Add your webhook endpoint URL
Duplicate webhooks
Duplicate webhooks
Problem: Receiving the same webhook multiple timesCauses:
- UIP retries webhooks if your server returns errors or times out
- Network issues causing automatic retries
- Use
audit_idormessage_idto detect duplicates - Make your webhook handler idempotent
- Store processed webhook IDs in a database to skip duplicates
Related resources
Test Webhook
Test your webhook configuration
Message API
Messages with webhook signature events
Audit API
Query audit records from webhooks
Error Handling
Handle API and webhook errors