API Reference
v1.7.3
Search…
⌃K

Create a webhook

post
https://api.complycube.com
/v1/webhooks
Create a webhook

Example request

cURL
Node.js
Python
PHP
.NET
curl -X POST https://api.complycube.com/v1/webhooks \
-H 'Authorization: <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"description": "This is my webhook, I like it a lot",
"url": "https://yoursite.com/my/webhook/endpoint",
"enabled": true,
"events": [
"check.pending",
"check.completed"
]
}'
const { ComplyCube } = require("@complycube/api");
const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });
const webhook = await complycube.webhook.create({
description: "This is my webhook, I like it a lot",
url: "https://yoursite.com/my/webhook/endpoint",
enabled: true,
events: [
"check.pending",
"check.completed"
]
});
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')
my_hook = {
'description': 'This is my webhook, I like it a lot',
'url': 'https://yoursite.com/my/webhook/endpoint',
'enabled': True,
'events': ['check.pending','check.completed']
}
webhook = cc_api.webhooks.create(**my_hook)
use ComplyCube\ComplyCubeClient;
$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
$webhook = $ccapi->webhooks()->create([
description => 'This is my webhook, I like it a lot',
url => 'https://yoursite.com/my/webhook/endpoint',
enabled => true,
events => [ 'check.pending','check.completed']
]);
using ComplyCube.Net;
using ComplyCube.Net.Resources.Webhooks;
var webhookApi = new WebhookApi(new ComplyCubeClient("<YOUR_API_KEY>"));
var webhookRequest = new WebhookRequest {
url = "https://yoursite.com/my/webhook/endpoint",
description = "This is my webhook, I like it a lot",
enabled = true,
events = new string[] {"check.completed",
"check.pending"}
};
var webhook = await webhookApi.CreateAsync(webhookRequest);