Actualizar una suscripción de webhook
curl --request PUT \
--url https://slc.sandbox.lerian.net/webhooks/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"description": "<string>",
"events": [
"<string>"
],
"headers": {},
"secret": "<string>",
"timeoutSeconds": 2,
"url": "<string>"
}
'import requests
url = "https://slc.sandbox.lerian.net/webhooks/{id}"
payload = {
"active": True,
"description": "<string>",
"events": ["<string>"],
"headers": {},
"secret": "<string>",
"timeoutSeconds": 2,
"url": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active: true,
description: '<string>',
events: ['<string>'],
headers: {},
secret: '<string>',
timeoutSeconds: 2,
url: '<string>'
})
};
fetch('https://slc.sandbox.lerian.net/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://slc.sandbox.lerian.net/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([
'active' => true,
'description' => '<string>',
'events' => [
'<string>'
],
'headers' => [
],
'secret' => '<string>',
'timeoutSeconds' => 2,
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "https://slc.sandbox.lerian.net/webhooks/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://slc.sandbox.lerian.net/webhooks/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slc.sandbox.lerian.net/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"createdAt": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"failureCount": 123,
"id": "<string>",
"lastDeliveryAt": "<string>",
"lastDeliveryStatus": 123,
"successCount": 123,
"updatedAt": "<string>",
"url": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}Actualizar una suscripción de webhook
Actualiza una suscripción de webhook. Los campos omitidos quedan sin cambios. Un nuevo secreto rota el secreto de firma (se vuelve a hashear; nunca se almacena en texto claro).
PUT
/
webhooks
/
{id}
Actualizar una suscripción de webhook
curl --request PUT \
--url https://slc.sandbox.lerian.net/webhooks/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"description": "<string>",
"events": [
"<string>"
],
"headers": {},
"secret": "<string>",
"timeoutSeconds": 2,
"url": "<string>"
}
'import requests
url = "https://slc.sandbox.lerian.net/webhooks/{id}"
payload = {
"active": True,
"description": "<string>",
"events": ["<string>"],
"headers": {},
"secret": "<string>",
"timeoutSeconds": 2,
"url": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active: true,
description: '<string>',
events: ['<string>'],
headers: {},
secret: '<string>',
timeoutSeconds: 2,
url: '<string>'
})
};
fetch('https://slc.sandbox.lerian.net/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://slc.sandbox.lerian.net/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([
'active' => true,
'description' => '<string>',
'events' => [
'<string>'
],
'headers' => [
],
'secret' => '<string>',
'timeoutSeconds' => 2,
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "https://slc.sandbox.lerian.net/webhooks/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://slc.sandbox.lerian.net/webhooks/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slc.sandbox.lerian.net/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"description\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"headers\": {},\n \"secret\": \"<string>\",\n \"timeoutSeconds\": 2,\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"createdAt": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"failureCount": 123,
"id": "<string>",
"lastDeliveryAt": "<string>",
"lastDeliveryStatus": 123,
"successCount": 123,
"updatedAt": "<string>",
"url": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}Autorizaciones
Bearer token authentication (format: "Bearer {token}")
Parámetros de ruta
Subscription id (UUID)
Cuerpo
application/json
Fields to update
¿Esta página le ayudó?
⌘I

