Update a webhook endpoint
curl --request PUT \
--url https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"meta": {},
"url": "<string>",
"supported_event_types": [
"<string>"
],
"secret": "<string>",
"description": "<string>"
}
'import requests
url = "https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}"
payload = {
"meta": {},
"url": "<string>",
"supported_event_types": ["<string>"],
"secret": "<string>",
"description": "<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({
meta: {},
url: '<string>',
supported_event_types: ['<string>'],
secret: '<string>',
description: '<string>'
})
};
fetch('https://developersandbox-api.flutterwave.com/profile/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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{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([
'meta' => [
],
'url' => '<string>',
'supported_event_types' => [
'<string>'
],
'secret' => '<string>',
'description' => '<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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}"
payload := strings.NewReader("{\n \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{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 \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"url": "<string>",
"secret": "<string>",
"id": "<string>",
"supported_event_types": [
"<string>"
],
"meta": {},
"description": "<string>",
"created_datetime": "2023-11-07T05:31:56Z"
}
}{
"status": "failed",
"error": {
"type": "REQUEST_NOT_VALID",
"code": "10400",
"message": "Request is not valid",
"validation_errors": [
{
"field_name": "amount",
"message": "must not be null"
}
]
}
}{
"status": "failed",
"message": "UNAUTHORIZED",
"error": {
"type": "UNAUTHORIZED",
"code": "10401",
"message": "unauthorized"
}
}{
"status": "failed",
"message": "<string>",
"error": {
"type": "FORBIDDEN",
"code": "10403",
"message": "Forbidden"
}
}{
"status": "failed",
"message": "<string>",
"error": {
"type": "RESOURCE_CONFLICT",
"code": "10409",
"message": "Resource conflict"
}
}Webhook Endpoints
Update a webhook endpoint
Update a webhook endpoint
PUT
/
profile
/
webhook-endpoints
/
{id}
Update a webhook endpoint
curl --request PUT \
--url https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"meta": {},
"url": "<string>",
"supported_event_types": [
"<string>"
],
"secret": "<string>",
"description": "<string>"
}
'import requests
url = "https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}"
payload = {
"meta": {},
"url": "<string>",
"supported_event_types": ["<string>"],
"secret": "<string>",
"description": "<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({
meta: {},
url: '<string>',
supported_event_types: ['<string>'],
secret: '<string>',
description: '<string>'
})
};
fetch('https://developersandbox-api.flutterwave.com/profile/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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{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([
'meta' => [
],
'url' => '<string>',
'supported_event_types' => [
'<string>'
],
'secret' => '<string>',
'description' => '<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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}"
payload := strings.NewReader("{\n \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<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://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developersandbox-api.flutterwave.com/profile/webhook-endpoints/{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 \"meta\": {},\n \"url\": \"<string>\",\n \"supported_event_types\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"url": "<string>",
"secret": "<string>",
"id": "<string>",
"supported_event_types": [
"<string>"
],
"meta": {},
"description": "<string>",
"created_datetime": "2023-11-07T05:31:56Z"
}
}{
"status": "failed",
"error": {
"type": "REQUEST_NOT_VALID",
"code": "10400",
"message": "Request is not valid",
"validation_errors": [
{
"field_name": "amount",
"message": "must not be null"
}
]
}
}{
"status": "failed",
"message": "UNAUTHORIZED",
"error": {
"type": "UNAUTHORIZED",
"code": "10401",
"message": "unauthorized"
}
}{
"status": "failed",
"message": "<string>",
"error": {
"type": "FORBIDDEN",
"code": "10403",
"message": "Forbidden"
}
}{
"status": "failed",
"message": "<string>",
"error": {
"type": "RESOURCE_CONFLICT",
"code": "10409",
"message": "Resource conflict"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique identifier to track this operation. It must be between 12 and 255 characters in length.
Required string length:
12 - 255Path Parameters
ID of the webhook endpoint
Body
application/json
Show child attributes
Show child attributes
Endpoint where webhooks would be sent
Event types accepted by endpoint
Status of webhook endpoint showing if it's allowed to receive webhooks
Available options:
enabled, disabled Secret used in generating verification hash for webhook payloads sent to endpoint
Required string length:
36 - 72Description of the webhook endpoint
Was this page helpful?
⌘I