Update
curl --request PUT \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/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.sandbox.wepayout.com.br/v2/register/companies/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' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event": "onboarding",
"url": "https://my-url.requestcatcher.com/test"
}
Webhook
Update
Update an existing webhook configuration
PUT
/
v2
/
register
/
companies
/
webhooks
/
{id}
Update
curl --request PUT \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/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.sandbox.wepayout.com.br/v2/register/companies/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' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event": "onboarding",
"url": "https://my-url.requestcatcher.com/test"
}
Update Webhook URL
This endpoint allows updating the webhook URL associated with a specific event.- The event parameter must be provided in the path
- The request body should include the new configuration values for the specified event’s webhook URL
Path Parameters
The event type for which to update the webhook URLExample:
onboardingRequest Body
Endpoint URL that will receive the webhook notifications for the selected event.URL characters:
a-z, A-Z charactersExample: https://my-url.requestcatcher.com/testResponse
Type of event that was registered for the webhookAllowed values:
onboardingEndpoint URL that was registered to receive webhook notificationsExample:
https://my-url.com/testRequest Example
curl --request PUT \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/onboarding \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://my-url.requestcatcher.com/test"
}'
const event = 'onboarding';
const response = await fetch(`https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/${event}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://my-url.requestcatcher.com/test'
})
});
const data = await response.json();
console.log(data);
import requests
event = 'onboarding'
url = f'https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks/{event}'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
data = {
'url': 'https://my-url.requestcatcher.com/test'
}
response = requests.put(url, json=data, headers=headers)
print(response.json())
{
"event": "onboarding",
"url": "https://my-url.requestcatcher.com/test"
}
Was this page helpful?
⌘I

