Referencia
Configurar webhook
Actualizá la URL, el estado o el secreto de tu webhook.
API v1AnteriorPATCH
/v1/webhooks/configConfigura el webhook compartido por V1, V2 y Cuenta para el ambiente actual. rotate_secret=true rota el secreto de verificación de ambas versiones.
- Autenticación
x-api-key- Consumo
- Sin consumo de cuota del plan
- Planes
- starter · growth · scale · custom
Request
Ejecutá este ejemplo desde tu servidor o terminal. Usá tu key en la variable CLASIFICAR_API_KEY.
Terminal
curl -X PATCH "https://api.clasific.ar/v1/webhooks/config" \
-H "x-api-key: $CLASIFICAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://tu-app.com/webhooks/clasificar","enabled":true,"rotate_secret":false}'TypeScript · servidor
const apiKey = process.env.CLASIFICAR_API_KEY;
if (!apiKey) throw new Error("Falta CLASIFICAR_API_KEY");
const response = await fetch(
"https://api.clasific.ar/v1/webhooks/config",
{
method: "PATCH",
headers: {
"x-api-key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://tu-app.com/webhooks/clasificar",
"enabled": true,
"rotate_secret": false
}),
},
);
if (!response.ok) {
throw new Error(
`HTTP ${response.status}: ${await response.text()}`,
);
}
const result: unknown = await response.json();
console.log(result);Parámetros
Body JSON
| Parámetro | Tipo / ubicación | Descripción |
|---|---|---|
urlOpcional | string | nullbody | URL HTTPS que recibirá eventos. null desconfigura la URL. |
enabledOpcional | booleanbody | Activa o desactiva entregas. |
rotate_secretOpcional | booleanbody | Genera un secret nuevo para validar próximos eventos. |
Respuesta
200 Ejemplo de respuesta. Los valores corresponden a datos ilustrativos del contrato V1.
Response · JSON
{
"success": true,
"data": {
"owner_ref": "user_martin",
"url": "https://tu-app.com/webhooks/clasificar",
"secret": "whsec_1234567890",
"enabled": true,
"updated_at": "2026-05-15T12:00:00.000Z"
}
}Errores
Comprobá el estado HTTP antes de procesar el resultado. Los formatos de error pueden variar por endpoint. Consultá errores y rate limits para gestionar errores de acceso y capacidad.