Update Webhook URL
curl --request PUT \
--url https://api.fyatu.com/api/v3/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhookUrl": "https://example.com/webhooks/fyatu"
}
'import requests
url = "https://api.fyatu.com/api/v3/webhooks"
payload = { "webhookUrl": "https://example.com/webhooks/fyatu" }
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({webhookUrl: 'https://example.com/webhooks/fyatu'})
};
fetch('https://api.fyatu.com/api/v3/webhooks', 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.fyatu.com/api/v3/webhooks",
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([
'webhookUrl' => 'https://example.com/webhooks/fyatu'
]),
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.fyatu.com/api/v3/webhooks"
payload := strings.NewReader("{\n \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\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.fyatu.com/api/v3/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/webhooks")
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 \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://example.com/webhooks/fyatu",
"hasWebhookSecret": true,
"isConfigured": true,
"webhookSecret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"secretNote": "This is your webhook secret. Store it securely - it will not be shown again."
},
"meta": {
"requestId": "req_abc123xyz789",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://new-endpoint.example.com/webhooks",
"hasWebhookSecret": true,
"isConfigured": true
},
"meta": {
"requestId": "req_def456uvw123",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": false,
"status": 400,
"message": "Validation failed",
"error": {
"code": "VALIDATION_ERROR",
"details": [
{
"field": "webhookUrl",
"message": "Webhook URL must use HTTPS"
}
]
},
"meta": {
"requestId": "req_ghi789rst456",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
Configuration
Update Webhook URL
Set or update your webhook endpoint URL for receiving real-time event notifications. PUT /webhooks.
PUT
/
webhooks
Update Webhook URL
curl --request PUT \
--url https://api.fyatu.com/api/v3/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhookUrl": "https://example.com/webhooks/fyatu"
}
'import requests
url = "https://api.fyatu.com/api/v3/webhooks"
payload = { "webhookUrl": "https://example.com/webhooks/fyatu" }
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({webhookUrl: 'https://example.com/webhooks/fyatu'})
};
fetch('https://api.fyatu.com/api/v3/webhooks', 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.fyatu.com/api/v3/webhooks",
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([
'webhookUrl' => 'https://example.com/webhooks/fyatu'
]),
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.fyatu.com/api/v3/webhooks"
payload := strings.NewReader("{\n \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\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.fyatu.com/api/v3/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/webhooks")
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 \"webhookUrl\": \"https://example.com/webhooks/fyatu\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://example.com/webhooks/fyatu",
"hasWebhookSecret": true,
"isConfigured": true,
"webhookSecret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"secretNote": "This is your webhook secret. Store it securely - it will not be shown again."
},
"meta": {
"requestId": "req_abc123xyz789",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://new-endpoint.example.com/webhooks",
"hasWebhookSecret": true,
"isConfigured": true
},
"meta": {
"requestId": "req_def456uvw123",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": false,
"status": 400,
"message": "Validation failed",
"error": {
"code": "VALIDATION_ERROR",
"details": [
{
"field": "webhookUrl",
"message": "Webhook URL must use HTTPS"
}
]
},
"meta": {
"requestId": "req_ghi789rst456",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
Update Webhook URL
Set or update the webhook URL where FYATU will send event notifications. The URL must use HTTPS. If this is the first time setting a webhook URL, a webhook secret will be automatically generated and returned in the response. Store this secret securely - it will not be shown again.Request
string
required
The HTTPS URL where webhooks will be sent. Set to
null or empty string to disable webhooks.curl -X PUT https://api.fyatu.com/api/v3/webhooks \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://example.com/webhooks/fyatu"
}'
Response
boolean
Whether the request was successful
object
{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://example.com/webhooks/fyatu",
"hasWebhookSecret": true,
"isConfigured": true,
"webhookSecret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"secretNote": "This is your webhook secret. Store it securely - it will not be shown again."
},
"meta": {
"requestId": "req_abc123xyz789",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": true,
"status": 200,
"message": "Webhook URL updated successfully",
"data": {
"webhookUrl": "https://new-endpoint.example.com/webhooks",
"hasWebhookSecret": true,
"isConfigured": true
},
"meta": {
"requestId": "req_def456uvw123",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
{
"success": false,
"status": 400,
"message": "Validation failed",
"error": {
"code": "VALIDATION_ERROR",
"details": [
{
"field": "webhookUrl",
"message": "Webhook URL must use HTTPS"
}
]
},
"meta": {
"requestId": "req_ghi789rst456",
"timestamp": "2026-01-15T10:30:00+00:00"
}
}
Validation Rules
| Rule | Description |
|---|---|
| HTTPS Required | Webhook URL must use https:// protocol |
| Valid URL | Must be a properly formatted URL |
| Max Length | URL must be less than 500 characters |
Disabling Webhooks
To disable webhooks, send an empty string ornull:
curl -X PUT https://api.fyatu.com/api/v3/webhooks \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": null
}'
When you first configure a webhook URL, a secret will be generated. Copy and store it immediately as it will not be displayed again. You’ll need this secret to verify webhook signatures.
Authorizations
JWT access token obtained from /auth/token
Body
application/json
The HTTPS URL where webhook events will be sent. Must use HTTPS protocol.
Example:
"https://example.com/webhooks/fyatu"
⌘I

