Update Webhook
curl --request PATCH \
--url http://localhost:3000/v2/integrations/webhooks/{id} \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
}
}
'import requests
url = "http://localhost:3000/v2/integrations/webhooks/{id}"
payload = {
"url": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
_id: '<string>',
number: 123,
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
}
})
};
fetch('http://localhost:3000/v2/integrations/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/integrations/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'_id' => '<string>',
'number' => 123,
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/integrations/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/v2/integrations/webhooks/{id}")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/integrations/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>"
}Webhooks
Update Webhook
Update an existing Webhook
PATCH
/
integrations
/
webhooks
/
{id}
Update Webhook
curl --request PATCH \
--url http://localhost:3000/v2/integrations/webhooks/{id} \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
}
}
'import requests
url = "http://localhost:3000/v2/integrations/webhooks/{id}"
payload = {
"url": "<string>",
"_id": "<string>",
"number": 123,
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
_id: '<string>',
number: 123,
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
}
})
};
fetch('http://localhost:3000/v2/integrations/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/integrations/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'_id' => '<string>',
'number' => 123,
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/integrations/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/v2/integrations/webhooks/{id}")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/integrations/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>"
}Path Parameters
Webhook ID
Body
application/json
Webhook data to update
A webhook that can be triggered on specific events.
The type of the webhook, e.g., CREATE, UPDATE, DELETE
Available options:
CREATE, UPDATE, DELETE, ABSENCE_APPROVED, ABSENCE_CANCELED, OPEN The entity that the webhook is associated with, e.g., "Absence", "Task"
Available options:
user, customer, customerobject, materialorder, absence, complaint, article, salary, job, qualitycontrol, invoice, offer, credit, invoicestorno, servicereport, payment, contact, equipment, task The URL to which the webhook will send data
Unique identifier of the entity
Unique number of the entity, used for identification
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
Response
Webhook updated successfully
Was this page helpful?
⌘I

