Skip to main content
PATCH
/
webhooks
/
{id}
Update a webhook
curl --request PATCH \
  --url https://api.sandbox.iron.xyz/api/webhooks/{id} \
  --header 'Content-Type: application/json; charset=utf-8' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "enabled": true,
  "label": "<string>",
  "topics": [],
  "url": "<string>"
}
'
import requests

url = "https://api.sandbox.iron.xyz/api/webhooks/{id}"

payload = {
    "enabled": True,
    "label": "<string>",
    "topics": [],
    "url": "<string>"
}
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json; charset=utf-8"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json; charset=utf-8'},
  body: JSON.stringify({enabled: true, label: '<string>', topics: [], url: '<string>'})
};

fetch('https://api.sandbox.iron.xyz/api/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.iron.xyz/api/webhooks/{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([
    'enabled' => true,
    'label' => '<string>',
    'topics' => [
        
    ],
    'url' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json; charset=utf-8",
    "X-API-Key: <api-key>"
  ],
]);

$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.iron.xyz/api/webhooks/{id}"

	payload := strings.NewReader("{\n  \"enabled\": true,\n  \"label\": \"<string>\",\n  \"topics\": [],\n  \"url\": \"<string>\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-API-Key", "<api-key>")
	req.Header.Add("Content-Type", "application/json; charset=utf-8")

	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.sandbox.iron.xyz/api/webhooks/{id}")
  .header("X-API-Key", "<api-key>")
  .header("Content-Type", "application/json; charset=utf-8")
  .body("{\n  \"enabled\": true,\n  \"label\": \"<string>\",\n  \"topics\": [],\n  \"url\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.iron.xyz/api/webhooks/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json; charset=utf-8'
request.body = "{\n  \"enabled\": true,\n  \"label\": \"<string>\",\n  \"topics\": [],\n  \"url\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2023-11-07T05:31:56Z",
  "enabled": true,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "label": "<string>",
  "partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "topics": [],
  "updated_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "last_failure": "2023-11-07T05:31:56Z",
  "last_failure_reason": "<string>"
}
"<string>"
"<string>"
"<string>"
{
  "message": "<string>",
  "trace_id": "<string>"
}

Authorizations

X-API-Key
string
header
required

API Key

Headers

X-SUB-PARTNER-ID
string

Optional sub-partner UUID, if provided, the webhook will be updated under scope of the sub-partner

Path Parameters

id
string<uuid>
required

The ID of the webhook to update

Body

application/json; charset=utf-8

The webhook update request

Update Webhook Request

Request to update an existing webhook

enabled
boolean

Optional enabled status

label
string

Optional new label for the webhook

topics
enum<string>[]

Optional new topics for the webhook

Webhook Event Types

Represents the different types of webhook events that can be sent

Available options:
Transaction,
NewBankAccount,
NewAutoramp,
DepositAddressCreated,
RegisterFiatAddressStatus,
RegisterAutorampStatus,
TransactionStatus,
CustomerCreated,
CustomerStatus,
IdentificationStatus,
Ping
url
string

Optional new URL for the webhook

Response

Update successful

Webhook

Response containing webhook details

created_at
string<date-time>
required

When the webhook was created

enabled
boolean
required

Whether the webhook is enabled

id
string<uuid>
required

The ID of the webhook

label
string
required

A descriptive label for the webhook

partner_id
string<uuid>
required

The partner ID that owns this webhook

topics
enum<string>[]
required

The topics this webhook subscribes to

Webhook Event Types

Represents the different types of webhook events that can be sent

Available options:
Transaction,
NewBankAccount,
NewAutoramp,
DepositAddressCreated,
RegisterFiatAddressStatus,
RegisterAutorampStatus,
TransactionStatus,
CustomerCreated,
CustomerStatus,
IdentificationStatus,
Ping
updated_at
string<date-time>
required

When the webhook was last updated

url
string
required

The URL to send webhook events to

last_failure
string<date-time>

The last time the webhook was executed with an error

last_failure_reason
string

The reason for the last failure