cURL
curl -X POST \
/webhooks \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"id": "",
"events": [
""
],
"version": "",
"enabled": "",
"url": "",
"webhookResults": [
"https:\/\/example.com\/"
],
"status": "",
"lastSentAt": "",
"activities": [
"https:\/\/example.com\/"
],
"tenantId": ""
}'import requests
url = "https://coreapi.io/webhooks"
payload = {
"events": ["<string>"],
"version": "<string>",
"enabled": True,
"url": "<string>",
"activities": ["https://example.com/"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: ['<string>'],
version: '<string>',
enabled: true,
url: '<string>',
activities: ['https://example.com/']
})
};
fetch('https://coreapi.io/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'<string>'
],
'version' => '<string>',
'enabled' => true,
'url' => '<string>',
'activities' => [
'https://example.com/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"events": [
"<string>"
],
"version": "<string>",
"enabled": true,
"url": "<string>"
}Webhook
Add webhook
Add webhook
Required permissions:webhook:writePOST
/
webhooks
cURL
curl -X POST \
/webhooks \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"id": "",
"events": [
""
],
"version": "",
"enabled": "",
"url": "",
"webhookResults": [
"https:\/\/example.com\/"
],
"status": "",
"lastSentAt": "",
"activities": [
"https:\/\/example.com\/"
],
"tenantId": ""
}'import requests
url = "https://coreapi.io/webhooks"
payload = {
"events": ["<string>"],
"version": "<string>",
"enabled": True,
"url": "<string>",
"activities": ["https://example.com/"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: ['<string>'],
version: '<string>',
enabled: true,
url: '<string>',
activities: ['https://example.com/']
})
};
fetch('https://coreapi.io/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'<string>'
],
'version' => '<string>',
'enabled' => true,
'url' => '<string>',
'activities' => [
'https://example.com/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"events": [
"<string>"
],
"version": "<string>",
"enabled": true,
"url": "<string>"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsontext/html
The new Webhook resource
War diese Seite hilfreich?
⌘I