Update a webhook endpoint
curl --request PATCH \
--url https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Qonto-Partner-Id: <api-key>' \
--data '
{
"callback_url": "https://example.com/myCallbackUrl",
"enabled": true,
"secret": "1qA+9OSwfnm0NuhF+b8CJA=="
}
'import requests
url = "https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}"
payload = {
"callback_url": "https://example.com/myCallbackUrl",
"enabled": True,
"secret": "1qA+9OSwfnm0NuhF+b8CJA=="
}
headers = {
"Authorization": "Bearer <token>",
"Qonto-Partner-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Qonto-Partner-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
callback_url: 'https://example.com/myCallbackUrl',
enabled: true,
secret: '1qA+9OSwfnm0NuhF+b8CJA=='
})
};
fetch('https://thirdparty-sandbox.staging.qonto.co/register/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_URL => "https://thirdparty-sandbox.staging.qonto.co/register/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([
'callback_url' => 'https://example.com/myCallbackUrl',
'enabled' => true,
'secret' => '1qA+9OSwfnm0NuhF+b8CJA=='
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Qonto-Partner-Id: <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://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}"
payload := strings.NewReader("{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Qonto-Partner-Id", "<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://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Qonto-Partner-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Qonto-Partner-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_subscription": {
"callback_url": "https://example.com/myCallbackUrl",
"enabled": true,
"secret": "1qA+9OSwfnm0NuhF+b8CJA==",
"id": "37824615-afec-4340-b700-0981b5f0c319",
"created_at": "2021-08-17T12:31:32.689Z",
"updated_at": "2021-08-17T12:31:32.689Z"
}
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "unauthorized",
"detail": "You must authenticate to perform API requests"
}
]
}{
"errors": [
{
"code": "not_found",
"detail": "The record identified by <uuid> could not be found."
}
]
}{
"errors": [
{
"code": "<error-code>",
"detail": "<relevant-detail>",
"source": {
"pointer": "<ie /data/attributes/attr_name>"
}
}
]
}Webhooks
Update a webhook endpoint
Updates the webhook endpoint identified by the id path parameter.
PATCH
/
register
/
webhooks
/
{id}
Update a webhook endpoint
curl --request PATCH \
--url https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Qonto-Partner-Id: <api-key>' \
--data '
{
"callback_url": "https://example.com/myCallbackUrl",
"enabled": true,
"secret": "1qA+9OSwfnm0NuhF+b8CJA=="
}
'import requests
url = "https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}"
payload = {
"callback_url": "https://example.com/myCallbackUrl",
"enabled": True,
"secret": "1qA+9OSwfnm0NuhF+b8CJA=="
}
headers = {
"Authorization": "Bearer <token>",
"Qonto-Partner-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Qonto-Partner-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
callback_url: 'https://example.com/myCallbackUrl',
enabled: true,
secret: '1qA+9OSwfnm0NuhF+b8CJA=='
})
};
fetch('https://thirdparty-sandbox.staging.qonto.co/register/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_URL => "https://thirdparty-sandbox.staging.qonto.co/register/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([
'callback_url' => 'https://example.com/myCallbackUrl',
'enabled' => true,
'secret' => '1qA+9OSwfnm0NuhF+b8CJA=='
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Qonto-Partner-Id: <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://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}"
payload := strings.NewReader("{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Qonto-Partner-Id", "<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://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Qonto-Partner-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty-sandbox.staging.qonto.co/register/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Qonto-Partner-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example.com/myCallbackUrl\",\n \"enabled\": true,\n \"secret\": \"1qA+9OSwfnm0NuhF+b8CJA==\"\n}"
response = http.request(request)
puts response.read_body{
"webhook_subscription": {
"callback_url": "https://example.com/myCallbackUrl",
"enabled": true,
"secret": "1qA+9OSwfnm0NuhF+b8CJA==",
"id": "37824615-afec-4340-b700-0981b5f0c319",
"created_at": "2021-08-17T12:31:32.689Z",
"updated_at": "2021-08-17T12:31:32.689Z"
}
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "unauthorized",
"detail": "You must authenticate to perform API requests"
}
]
}{
"errors": [
{
"code": "not_found",
"detail": "The record identified by <uuid> could not be found."
}
]
}{
"errors": [
{
"code": "<error-code>",
"detail": "<relevant-detail>",
"source": {
"pointer": "<ie /data/attributes/attr_name>"
}
}
]
}Authorizations
Bearer authorization header: Bearer <token>.
To get your <token>, please sign up to the Developer Portal.
API Key authorization header: Qonto-Partner-Id: <partner_id>.
To get your <partner_id> please, sign up to the Developer Portal.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Path Parameters
id of the Webhook resource
Example:
"63647ae1-eeb0-4294-9bf0-65e1d9d0db66"
Body
application/json
Response
Returns the updated webhook endpoint.
Show child attributes
Show child attributes
Was this page helpful?
⌘I