Eliminar un Webhook
Endpoint
DELETE https://api.verifik.co/v2/webhooks/{id}
Para eliminar un webhook específico, haz una solicitud DELETE al endpoint donde {id} debe reemplazarse con el identificador único del webhook que deseas eliminar.
Encabezados
| Nombre | Valor |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parámetros de Ruta
id
Tipo: string
Requerido: Sí
ID del webhook que deseas eliminar.
Ejemplo de Solicitud
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'DELETE',
url: 'https://api.verifik.co/v2/webhooks/66df1c0ad08b9d244bd1c806',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
conn.request("DELETE", "/v2/webhooks/66df1c0ad08b9d244bd1c806", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api.verifik.co/v2/webhooks/66df1c0ad08b9d244bd1c806', [
'headers' => [
'Content-Type': 'application/json',
'Authorization' => 'Bearer <your_token>',
],
]);
echo $response->getBody();
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.verifik.co/v2/webhooks/66df1c0ad08b9d244bd1c806"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <your_token>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Ejemplo de Respuesta
- 200 OK
- Error
{
"data": {
"_id": "66df1c0ad08b9d244bd1c806",
"client": "613375a1eab2fe08527f81e2",
"projectFlow": [],
"isActive": true,
"name": "Postman sample",
"url": "https://sandbox.verifik.co/v2/webhooks/logs",
"notification": {
"success": false,
"fail": true,
"_id": "66df1c0ad08b9d244bd1c805"
},
"updatedAt": "2024-09-09T16:02:18.713Z",
"createdAt": "2024-09-09T16:02:18.713Z",
"__v": 0
}
}
{
"code": "NotFound",
"message": "Record not found."
}