Update a webhook
curl --request PUT \
--url https://api.tabby.ai/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Merchant-Code: <x-merchant-code>' \
--data '
{
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}
'import requests
url = "https://api.tabby.ai/api/v1/webhooks/{id}"
payload = {
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}
headers = {
"X-Merchant-Code": "<x-merchant-code>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Merchant-Code': '<x-merchant-code>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example-updated.com/',
header: {
title: 'Arbitrary header name to sign the request',
value: 'Random string to sign the request'
}
})
};
fetch('https://api.tabby.ai/api/v1/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://api.tabby.ai/api/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example-updated.com/',
'header' => [
'title' => 'Arbitrary header name to sign the request',
'value' => 'Random string to sign the request'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Merchant-Code: <x-merchant-code>"
],
]);
$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.tabby.ai/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Merchant-Code", "<x-merchant-code>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.tabby.ai/api/v1/webhooks/{id}")
.header("X-Merchant-Code", "<x-merchant-code>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Merchant-Code"] = '<x-merchant-code>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "unique webhook id",
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "authorization"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no such webhook"
}"Internal Server error"Webhooks
Update a webhook
Updates the specified webhook.
PUT
/
api
/
v1
/
webhooks
/
{id}
Update a webhook
curl --request PUT \
--url https://api.tabby.ai/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Merchant-Code: <x-merchant-code>' \
--data '
{
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}
'import requests
url = "https://api.tabby.ai/api/v1/webhooks/{id}"
payload = {
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}
headers = {
"X-Merchant-Code": "<x-merchant-code>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Merchant-Code': '<x-merchant-code>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example-updated.com/',
header: {
title: 'Arbitrary header name to sign the request',
value: 'Random string to sign the request'
}
})
};
fetch('https://api.tabby.ai/api/v1/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://api.tabby.ai/api/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example-updated.com/',
'header' => [
'title' => 'Arbitrary header name to sign the request',
'value' => 'Random string to sign the request'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Merchant-Code: <x-merchant-code>"
],
]);
$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.tabby.ai/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Merchant-Code", "<x-merchant-code>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.tabby.ai/api/v1/webhooks/{id}")
.header("X-Merchant-Code", "<x-merchant-code>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Merchant-Code"] = '<x-merchant-code>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example-updated.com/\",\n \"header\": {\n \"title\": \"Arbitrary header name to sign the request\",\n \"value\": \"Random string to sign the request\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "unique webhook id",
"url": "https://example-updated.com/",
"header": {
"title": "Arbitrary header name to sign the request",
"value": "Random string to sign the request"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "authorization"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no such webhook"
}"Internal Server error"Authorizations
Bearer authentication header of the form Bearer <secret_key>, where <secret_key> is your secret_key.
Headers
Used for multi store/countries setup, please contact your Account manager to recognize that
Example:
"code provided to you from Tabby side"
Path Parameters
ID of the webhook.
Example:
"webhook id, uuid format"
Body
application/json
Response
Success. Webhook object is returned.
Was this page helpful?
⌘I