Inbound webhooks let external services create records in a Hasp app by POSTing JSON to a unique token-authenticated URL.Documentation Index
Fetch the complete documentation index at: https://docs.usehasp.com/llms.txt
Use this file to discover all available pages before exploring further.
Inbound webhooks are the one place you call the Data API directly — no SDK is needed because the caller is an external service, not your app’s JavaScript.
Endpoint
{token} is the full plaintext token shown in the Hasp dashboard when you create the webhook. No X-Hasp-AppId header or session cookie is needed — the token identifies both the app and the target entity.
Max body size: 256 KB.
Idempotency
Include anX-Idempotency-Key header (max 255 characters) to prevent duplicate records from replayed or retried requests. Hasp caches the response for 24 hours — repeat requests with the same key return the original response without creating a second record.
Request
Response
201 Created:Error Responses
| HTTP | Code | When |
|---|---|---|
| 404 | NOT_FOUND | Token not found or webhook is inactive |
| 413 | PAYLOAD_TOO_LARGE | Body exceeds 256 KB |
| 422 | VALIDATION_FAILED | Payload fails entity schema validation |
| 422 | ERROR | Quota exceeded or processing error |
Loop Prevention
If the request contains anX-Hasp-Webhook-Id header (set automatically on all outbound webhook deliveries), the record.created event is not re-dispatched. This prevents outbound → inbound → outbound infinite loops.