Update an endpoint
A JSON Merge Patch: a field you leave out stays as it is, a field you send as null is removed (so "rateLimitPerSecond": null removes the ceiling), anything else replaces it. url, status, payloadStyle and eventTypes cannot be removed. eventTypes, organisationIds, excludedOrganisationIds and alertContacts replace the whole list and change the same lists as the endpoint’s event-types, organisations, excluded-organisations and alert-contacts resources, which add and remove single entries. Set status to Paused to stop deliveries while you work on your receiver; events that happen meanwhile are recorded as skipped and can be replayed. Two changes made to the same endpoint at the same moment both apply; if it keeps changing under your request you get a 409 concurrent_change and can simply try again.
curl --request PATCH \
--url https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"url": "<string>",
"description": "<string>",
"eventTypes": [
"<string>"
],
"organisationIds": [
"<string>"
],
"excludedOrganisationIds": [
"<string>"
],
"rateLimitPerSecond": 123,
"customHeaders": {},
"alertContacts": [
"<string>"
]
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}"
payload = {
"url": "<string>",
"description": "<string>",
"eventTypes": ["<string>"],
"organisationIds": ["<string>"],
"excludedOrganisationIds": ["<string>"],
"rateLimitPerSecond": 123,
"customHeaders": {},
"alertContacts": ["<string>"]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
eventTypes: ['<string>'],
organisationIds: ['<string>'],
excludedOrganisationIds: ['<string>'],
rateLimitPerSecond: 123,
customHeaders: {},
alertContacts: ['<string>']
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}', 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://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}",
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>',
'description' => '<string>',
'eventTypes' => [
'<string>'
],
'organisationIds' => [
'<string>'
],
'excludedOrganisationIds' => [
'<string>'
],
'rateLimitPerSecond' => 123,
'customHeaders' => [
],
'alertContacts' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$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 := "https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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("https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"endpointId": "<string>",
"scope": "Organisation",
"ownerId": "<string>",
"url": "<string>",
"status": "Paused",
"destinationType": "Https",
"apiVersion": "<string>",
"payloadStyle": "Minimal",
"ordering": "Unordered",
"eventTypes": [
"<string>"
],
"organisationIds": [
"<string>"
],
"excludedOrganisationIds": [
"<string>"
],
"customHeaderNames": [
"<string>"
],
"alertContacts": [
"<string>"
],
"createdDate": "<string>",
"updatedDate": "<string>",
"description": "<string>",
"statusReason": "<string>",
"rateLimitPerSecond": 123
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}Authorizations
FlowPayroll JWT (raw token, no Bearer prefix)
Path Parameters
Body
Paused, Active, DisabledBySystem, null Minimal, Full, null Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"url": "<string>",
"description": "<string>",
"eventTypes": [
"<string>"
],
"organisationIds": [
"<string>"
],
"excludedOrganisationIds": [
"<string>"
],
"rateLimitPerSecond": 123,
"customHeaders": {},
"alertContacts": [
"<string>"
]
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}"
payload = {
"url": "<string>",
"description": "<string>",
"eventTypes": ["<string>"],
"organisationIds": ["<string>"],
"excludedOrganisationIds": ["<string>"],
"rateLimitPerSecond": 123,
"customHeaders": {},
"alertContacts": ["<string>"]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
eventTypes: ['<string>'],
organisationIds: ['<string>'],
excludedOrganisationIds: ['<string>'],
rateLimitPerSecond: 123,
customHeaders: {},
alertContacts: ['<string>']
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}', 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://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}",
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>',
'description' => '<string>',
'eventTypes' => [
'<string>'
],
'organisationIds' => [
'<string>'
],
'excludedOrganisationIds' => [
'<string>'
],
'rateLimitPerSecond' => 123,
'customHeaders' => [
],
'alertContacts' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$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 := "https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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("https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/webhooks/endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"organisationIds\": [\n \"<string>\"\n ],\n \"excludedOrganisationIds\": [\n \"<string>\"\n ],\n \"rateLimitPerSecond\": 123,\n \"customHeaders\": {},\n \"alertContacts\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"endpointId": "<string>",
"scope": "Organisation",
"ownerId": "<string>",
"url": "<string>",
"status": "Paused",
"destinationType": "Https",
"apiVersion": "<string>",
"payloadStyle": "Minimal",
"ordering": "Unordered",
"eventTypes": [
"<string>"
],
"organisationIds": [
"<string>"
],
"excludedOrganisationIds": [
"<string>"
],
"customHeaderNames": [
"<string>"
],
"alertContacts": [
"<string>"
],
"createdDate": "<string>",
"updatedDate": "<string>",
"description": "<string>",
"statusReason": "<string>",
"rateLimitPerSecond": 123
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}