Skip to main content

Create a Webhook

Endpoint​

POST https://api.verifik.co/v2/webhooks

This API allows you to create a new webhook within your account. You can associate a webhook with project Flows in this step or when you update the webhook.

headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

body parameters​

url​

Type: string
Required: Yes

The url where we will send the information via POST.

name​

Type: string
Required: Yes

The name of your webhook to identify it easily.

isActive​

Type: boolean
Required: Yes

This boolean will enable/disable it whenever you require it.

description​

Type: string
Required: No

Description to know what information you will be sending there.

Type: array
Required: No

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

Request Example​

import axios from 'axios';

const options = {
method: 'POST',
url: 'https://api.verifik.co/v2/webhooks',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
},
data: {
url: 'https://sandbox.verifik.co/v2/webhooks/logs',
name: 'Postman sample',
isActive: true,
description: 'This is an example',
link: ['66df24f4c80823e06a348019']
}
};

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

Response Example​

{
"data": {
"client": "613375a1eab2fe08527f81e2",
"projectFlow": [
"66df24f4c80823e06a348019"
],
"isActive": true,
"name": "Postman sample",
"url": "https://sandbox.verifik.co/v2/webhooks/logs",
"notification": {
"success": false,
"fail": true,
"_id": "66df272bf82f3bfab17dea9a"
},
"_id": "66df272bf82f3bfab17dea9b",
"updatedAt": "2024-09-09T16:49:47.373Z",
"createdAt": "2024-09-09T16:49:47.373Z",
"__v": 0
}
}
  • Project Flow Integration: Link webhooks to specific project flows
  • Flexible Configuration: Set custom URLs, names, and descriptions
  • Multiple Programming Languages: Support for JavaScript, Python, PHP, and Swift
  • Error Handling: Comprehensive error responses for various scenarios