Skip to main content

Update a Webhook

Endpoint​

PUT https://api.verifik.co/v2/webhooks/{id}

Method for updating an existing webhook. To make the service work, the _id parameter is required, which is generated when a webhook is created correctly.

headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

path parameters​

id​

Type: string
Required: Yes

The unique identifier of the webhook to update.

body parameters​

name​

Type: string
Required: No

The new name you want this webhook to have.

url​

Type: string
Required: No

You can update the url to where you want to receive the POST calls.

description​

Type: string
Required: No

The new description you want this webhook to have.

Type: array
Required: No

Array of projectFlows that you want to link this webhook to.

Type: array
Required: No

Array of projectFlows that you want to unlink from this webhook.

Request Example​

import axios from 'axios';

const options = {
method: 'PUT',
url: 'https://api.verifik.co/v2/webhooks/66de320d6a5c6ef0e02d4223',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
},
data: {
url: 'https://sandbox.verifik.co/v2/webhooks/logs',
name: 'Updated webhook name',
description: 'Updated description'
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Response Example​

{
"data": {
"_id": "66de320d6a5c6ef0e02d4223",
"client": "613375a1eab2fe08527f81e2",
"projectFlow": [],
"isActive": true,
"name": "Updated webhook name",
"url": "https://sandbox.verifik.co/v2/webhooks/logs",
"notification": {
"success": false,
"fail": true,
"_id": "66de320d6a5c6ef0e02d4222"
},
"updatedAt": "2024-09-08T23:23:57.678Z",
"createdAt": "2024-09-08T23:23:57.678Z",
"__v": 0
}
}
  • Flexible Updates: Update any webhook field independently
  • Project Flow Management: Link or unlink project flows from webhooks
  • Partial Updates: Only send the fields you want to change
  • Multiple Programming Languages: Support for JavaScript, Python, PHP, and Swift
  • Error Handling: Proper 404 responses for non-existent webhooks