Update Webhook Endpoint
curl --request PATCH \
--url https://api.fintoc.com/v1/webhook_endpoints/{id} \
--header 'Content-Type: application/json' \
--data '
{
"description": "Descripción del Webhook Endpoint",
"enabled_events": [
"account.refresh_intent.succeeded"
],
"url": "https://my.webhook.endpoint",
"disabled": false
}
'import requests
url = "https://api.fintoc.com/v1/webhook_endpoints/{id}"
payload = {
"description": "Descripción del Webhook Endpoint",
"enabled_events": ["account.refresh_intent.succeeded"],
"url": "https://my.webhook.endpoint",
"disabled": False
}
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({
description: 'Descripción del Webhook Endpoint',
enabled_events: ['account.refresh_intent.succeeded'],
url: 'https://my.webhook.endpoint',
disabled: false
})
};
fetch('https://api.fintoc.com/v1/webhook_endpoints/{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.fintoc.com/v1/webhook_endpoints/{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([
'description' => 'Descripción del Webhook Endpoint',
'enabled_events' => [
'account.refresh_intent.succeeded'
],
'url' => 'https://my.webhook.endpoint',
'disabled' => false
]),
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 := "https://api.fintoc.com/v1/webhook_endpoints/{id}"
payload := strings.NewReader("{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\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("https://api.fintoc.com/v1/webhook_endpoints/{id}")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/webhook_endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"we_M6yrvOepCe3Rqp8B\",\n \"description\": \"Eventos que recibirá el webhook.\",\n \"url\": \"https://my.webhook.endpoint\",\n \"status\": \"enabled\",\n \"mode\": \"test\",\n \"secret\": null,\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"created_at\": \"2021-05-17T17:04:10.284Z\"\n}"Webhook endpoints
Update Webhook Endpoint
PATCH
/
webhook_endpoints
/
{id}
Update Webhook Endpoint
curl --request PATCH \
--url https://api.fintoc.com/v1/webhook_endpoints/{id} \
--header 'Content-Type: application/json' \
--data '
{
"description": "Descripción del Webhook Endpoint",
"enabled_events": [
"account.refresh_intent.succeeded"
],
"url": "https://my.webhook.endpoint",
"disabled": false
}
'import requests
url = "https://api.fintoc.com/v1/webhook_endpoints/{id}"
payload = {
"description": "Descripción del Webhook Endpoint",
"enabled_events": ["account.refresh_intent.succeeded"],
"url": "https://my.webhook.endpoint",
"disabled": False
}
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({
description: 'Descripción del Webhook Endpoint',
enabled_events: ['account.refresh_intent.succeeded'],
url: 'https://my.webhook.endpoint',
disabled: false
})
};
fetch('https://api.fintoc.com/v1/webhook_endpoints/{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.fintoc.com/v1/webhook_endpoints/{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([
'description' => 'Descripción del Webhook Endpoint',
'enabled_events' => [
'account.refresh_intent.succeeded'
],
'url' => 'https://my.webhook.endpoint',
'disabled' => false
]),
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 := "https://api.fintoc.com/v1/webhook_endpoints/{id}"
payload := strings.NewReader("{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\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("https://api.fintoc.com/v1/webhook_endpoints/{id}")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/webhook_endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Descripción del Webhook Endpoint\",\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"disabled\": false\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"we_M6yrvOepCe3Rqp8B\",\n \"description\": \"Eventos que recibirá el webhook.\",\n \"url\": \"https://my.webhook.endpoint\",\n \"status\": \"enabled\",\n \"mode\": \"test\",\n \"secret\": null,\n \"enabled_events\": [\n \"account.refresh_intent.succeeded\"\n ],\n \"created_at\": \"2021-05-17T17:04:10.284Z\"\n}"v1 · Base URL https://api.fintoc.com/v1Encabezados
Fintoc Secret Key
Parámetros de ruta
The id of the Webhook Endpoint to update.
Cuerpo
application/json
Optional description that might help identify the responsibilities of the endpoint.
Events that will trigger a webhook to be sent.
URL that will receive the notifications about events.
Optional parameter to disable or enable the notifications to the endpoint.
Respuesta
200 - application/json
200
¿Esta página le ayudó?
⌘I