https://api.veriko.mx/v1/webhooksCreate a webhook endpoint
How-to guide →Registers an HTTPS endpoint that will receive the subscribed events as webhooks. The URL must resolve to a public address: localhost and private ranges are rejected.
Each endpoint can subscribe to different events, among them:
validation.*events: they report each verdict of a validation and each step of its automatic retries (e.g.validation.completed,validation.error, and so on).validation.returnedevent: it fires when a validation that had already come outvalidlater moves toreturnedbecause Banxico reported the return; it is not emitted when the validation is created, where the event isvalidation.completed. To receive it, subscribe to it in addition tovalidation.completed.billing.*events: they produce no delivery until something moves in the user's subscription (e.g.billing.subscription_canceled,billing.payment_succeeded, usage quotas, and so on).
Once the cap of registered endpoints is reached, creation responds with HTTP status 422 (with webhook_limit_reached in the body) and the limit value in the meta.limit field.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string (uri) (?–2048) | required | URL that receives the webhook. It is rejected if it resolves to a private address or is longer than 2048 characters and, in production, also if it does not use HTTPS. e.g.https://example.com/webhooks/entregas |
events | array<string> (items: 1–10) | required | Events the endpoint subscribes to, from 1 to 10. |
description | string | nullnullable (?–255) | optional | Free-form label to tell this endpoint apart from the others. Alta de pagos en el ERP |
curl -X POST 'https://api.veriko.mx/v1/webhooks' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://webhook.example.com/platform",
"events": [
"validation.completed",
"validation.failed",
"validation.error",
"billing.payment_succeeded",
"billing.payment_failed"
]
}'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
| Field | Type | Description |
|---|---|---|
type* | string | JSON:API resource type. Always webhook_endpoint |
id* | string (uuid) | Unique identifier of the webhook endpoint (UUID v4). e.g.a1b2c3d4-e5f6-7890-abcd-ef0123456789 |
attributes* | object | Webhook endpoint data (receiver URL, subscribed events, status, and secret). |
url* | string (uri) | URL that receives the webhook. In production it is rejected if it does not use HTTPS, if it resolves to a private address, or if it is longer than 2048 characters. e.g.https://example.com/webhooks/entregas |
events* | array (items: 1–10, unique items) | Events the endpoint subscribes to, from 1 to 10. |
description* | string | nullnullable | Free-form label to tell this endpoint apart from the others. e.g.Alta de pagos en el ERP |
status* | string |
active |
consecutive_failures* | integer | Number of consecutive failures. Resets on the first success. e.g.0 |
last_delivery_at* | TimestampUTC | null | Date and time of the last successful delivery, in ISO 8601 UTC. |
secret | string | Shared secret for signature verification. Only present in the create and rotate-secret responses; omitted from every other response. It is used to validate the a0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566778899aabbccddeeff |
secret_hint | string | Last 4 characters of the secret, prefixed with ...4f2a |
created_at* | string (date-time) | ISO 8601 timestamp in UTC with an explicit 2026-05-01T05:14:38Z |
updated_at* | string (date-time) | ISO 8601 timestamp in UTC with an explicit 2026-05-01T05:14:38Z |
| Status | Class | Description | Body |
|---|---|---|---|
| 201 | 2xx | Endpoint created. The secret field appears in this response only and cannot be read again: it is what verifies the X-Webhook-Signature: sha256=<hex> signature carried by every delivery. | WebhookEndpoint |
| 400 | 4xx | The request body is empty or is not valid JSON, or the URL points to a non-public address. | ErrorResponse |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 403 | 4xx | Insufficient permissions. | ErrorResponse |
| 413 | 4xx | The request body exceeds the maximum accepted size (body_too_large). | ErrorResponse |
| 422 | 4xx | The URL, the event list, or description failed validation, or the account has reached its endpoint cap. webhook_url_invalid_type and webhook_description_invalid_type fire when the field arrives as a type other than a string; webhook_description_too_long when description exceeds 255 characters. Every field-level error carries source.pointer. | ErrorResponse |
| 429 | 4xx | Rate limit exceeded | ErrorResponse |
| Status | Code | Example |
|---|---|---|
| 400 | body_empty | The request body is empty. Envelope
|
| 400 | invalid_json | The body is not valid JSON. Envelope
|
| 400 | url_dns_failed | The host name could not be resolved. Envelope
|
| 400 | url_ssrf_blocked | The given URL resolves to a non-public address. Envelope
|
| 401 | unauthorized | Invalid or missing authentication credentials. Envelope
|
| 403 | permission_denied | You do not have permission to access this resource. Envelope
|
| 413 | body_too_large | The request body is too large. Envelope
|
| 422 | validation_error | The url field is required. Envelope
|
| 422 | webhook_description_too_long | The description field must not exceed 255 characters. Envelope
|
| 422 | webhook_event_invalid | The given event does not exist. The rejected event is in meta.event. Envelope
|
| 422 | webhook_events_required | The endpoint must subscribe to at least one event. Envelope
|
| 422 | webhook_events_too_many | An endpoint accepts at most 10 events. Envelope
|
| 422 | webhook_limit_reached | The maximum number of allowed endpoints has been reached. The applied cap is in meta.limit. Envelope
|
| 422 | webhook_url_invalid_format | The URL is not a valid URL. Envelope
|
| 422 | webhook_url_not_https | The URL must use HTTPS. Envelope
|
| 422 | webhook_url_required | The url field is required. Envelope
|
| 422 | webhook_url_too_long | The URL cannot exceed 2,048 characters. Envelope
|
| 429 | rate_limit_exceeded | Rate limit exceeded. Try again in 45 seconds. Envelope
Response headers
|