POSThttps://api.veriko.mx/v1/webhooks/{id}/regenerate-secret

Regenerate webhook signing secret

Visibility
public
Auth
API key
Permission
webhooks.endpoints.update
How-to guide →

Rotates the secret used to sign this endpoint's delivery bodies. The new secret travels exactly once, in this response, and there is no way to read it again.

For the next 24 hours, every delivery also carries the signature made with the previous secret in the X-Webhook-Signature-Old header (same format as X-Webhook-Signature-Timestamped). Queued or retrying deliveries are therefore not rejected while you update your receiver: accept the current or the previous signature until the time in previous_secret_expires_at.

Parameters
ParameterInTypeRequiredDescription
id*pathstring (uuid)required

Unique identifier of the webhook endpoint (UUID v4).

e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479
Parameters
ParameterTypeRequiredDescription
immediatebooleanoptional

true revokes the previous secret at once, with no grace period. Use it if the secret was exposed.

Default: false

Request
curl -X POST 'https://api.veriko.mx/v1/webhooks/{id}/regenerate-secret' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json' \
  -d '{
    "immediate": false
  }'

Python example — coming soon.

JavaScript example — coming soon.

PHP example — coming soon.

Response 200WebhookEndpoint
— New signing secret generated. Returned only in this response.
FieldTypeDescription
type*string

JSON:API resource type. Always webhook_endpoint.

e.g. 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 receives deliveries. disabled was manually turned off. auto_disabled was turned off by the platform after exceeding the consecutive-failure threshold.

e.g. 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. null when the endpoint has not completed a delivery yet.

secretstring

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 X-Webhook-Signature and X-Webhook-Signature-Timestamped headers on each delivery.

e.g. a0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566778899aabbccddeeff
secret_hintstring

Last 4 characters of the secret, prefixed with .... Present on any response where the full secret is hidden.

e.g. ...4f2a
created_at*string (date-time)

ISO 8601 timestamp in UTC with an explicit Z suffix; for example, "2026-05-01T05:14:38Z". The *_at, *_end, *_start, and *_date fields follow this format. meta.datetime describes the same contract in the response.

e.g. 2026-05-01T05:14:38Z
updated_at*string (date-time)

ISO 8601 timestamp in UTC with an explicit Z suffix; for example, "2026-05-01T05:14:38Z". The *_at, *_end, *_start, and *_date fields follow this format. meta.datetime describes the same contract in the response.

e.g. 2026-05-01T05:14:38Z
previous_secret_expires_at*TimestampUTC | null

End of the previous secret's grace period, in ISO 8601 UTC. After the secret is regenerated, the previous one keeps signing deliveries for 24 hours in the X-Webhook-Signature-Old header. null when no rotation is in progress, when the grace period has expired, or when the regeneration was requested with immediate: true. The previous secret is never returned.

e.g. null
Response status codesPOST /v1/webhooks/{id}/regenerate-secret
StatusClassDescriptionBody
2002xx
New signing secret generated. Returned only in this response.
WebhookEndpoint
4004xx
invalid_json: a body was sent that is not valid JSON. The body is optional; if immediate is not needed, omit it.
ErrorResponse
4014xx
Authentication is required or the provided credentials are invalid.
ErrorResponse
4034xx
Insufficient permissions. Also email_verification_required: the account's email cannot receive mail and, until it is fixed or verified, only reading the profile, fixing the email, and logging out are allowed.
ErrorResponse
4044xx
not_found: Endpoint does not exist or does not belong to the user.
ErrorResponse
4134xx
The request body exceeds the maximum accepted size (body_too_large).
ErrorResponse
4224xx
webhook_immediate_invalid_type: immediate is not a boolean.
ErrorResponse
4294xx
Rate limit exceeded (rate_limit_exceeded: wait a few seconds).
RetryAfterError
Errors from POST /v1/webhooks/{id}/regenerate-secret
StatusCodeExample
400invalid_json

The request body is not valid JSON. Check its syntax and resend it.

Envelope
meta.request_id
a08133f3b445
401unauthorized

This request requires authentication.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
403permission_denied

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c00c9b8a7f6e5d
404not_found

We could not find what you requested.

Envelope
meta.request_id
afe161c75c40
413body_too_large

The body exceeds the 1 MB maximum.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
429rate_limit_exceeded

You exceeded the request limit.

Envelope
meta.request_id
f7a8b9c0d1e22e1d0c9b8a7f
Response headers
  • Retry-After: integer — Seconds to wait before retrying. Matches the endpoint's rate-limit window (typically 60s for list endpoints, 1-5s for in-flight idempotent operations).
  • X-RateLimit-Limit: integer — Configured request cap for this bucket. It is emitted on every 429 and, on the authenticated API, also on successful responses, where it is the per-key cap of the account plan.
  • X-RateLimit-Remaining: integer — Requests remaining in the current window. Always 0 at the moment of the 429; on a successful response of the authenticated API it is what is left of the per-key cap.
  • X-RateLimit-Reset: integer — Absolute Unix epoch (seconds) when the window resets. Emitted on every 429, alongside Retry-After, and on successful responses of the authenticated API.