Update a webhook endpoint
curl --request PATCH \
--url https://api.blank.build/api/v2/webhook-endpoints/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'if-match: <if-match>' \
--data '
{
"eventTypes": [],
"name": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.blank.build/api/v2/webhook-endpoints/{endpointId}"
payload = {
"eventTypes": [],
"name": "<string>",
"url": "<string>"
}
headers = {
"idempotency-key": "<idempotency-key>",
"if-match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'idempotency-key': '<idempotency-key>',
'if-match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({eventTypes: [], name: '<string>', url: '<string>'})
};
fetch('https://api.blank.build/api/v2/webhook-endpoints/{endpointId}', 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.blank.build/api/v2/webhook-endpoints/{endpointId}",
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([
'eventTypes' => [
],
'name' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"if-match: <if-match>"
],
]);
$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.blank.build/api/v2/webhook-endpoints/{endpointId}"
payload := strings.NewReader("{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("if-match", "<if-match>")
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.patch("https://api.blank.build/api/v2/webhook-endpoints/{endpointId}")
.header("idempotency-key", "<idempotency-key>")
.header("if-match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blank.build/api/v2/webhook-endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["if-match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"eventTypes": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"url": "<string>",
"version": 123
}{
"code": "precondition_invalid",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 400,
"title": "Invalid precondition",
"type": "https://blank.build/docs/reference/errors#precondition_invalid",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "invalid_api_key",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 401,
"title": "Invalid API key",
"type": "https://blank.build/docs/reference/errors#invalid_api_key",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "insufficient_scope",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 403,
"title": "Insufficient scope",
"type": "https://blank.build/docs/reference/errors#insufficient_scope",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "webhook_endpoint_not_found",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 404,
"title": "Webhook endpoint not found",
"type": "https://blank.build/docs/reference/errors#webhook_endpoint_not_found",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "idempotency_key_reused",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 409,
"title": "Idempotency key reused",
"type": "https://blank.build/docs/reference/errors#idempotency_key_reused",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "precondition_failed",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 412,
"title": "Precondition failed",
"type": "https://blank.build/docs/reference/errors#precondition_failed",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "request_body_too_large",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 413,
"title": "Request body too large",
"type": "https://blank.build/docs/reference/errors#request_body_too_large",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "unsupported_content_type",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 415,
"title": "Unsupported content type",
"type": "https://blank.build/docs/reference/errors#unsupported_content_type",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "webhook_url_disallowed",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 422,
"title": "Webhook URL disallowed",
"type": "https://blank.build/docs/reference/errors#webhook_url_disallowed",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "precondition_required",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 428,
"title": "Precondition required",
"type": "https://blank.build/docs/reference/errors#precondition_required",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "rate_limit_exceeded",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 429,
"title": "Rate limit exceeded",
"type": "https://blank.build/docs/reference/errors#rate_limit_exceeded",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "internal_error",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 500,
"title": "Internal server error",
"type": "https://blank.build/docs/reference/errors#internal_error",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "rate_limit_unavailable",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 503,
"title": "Rate limiting unavailable",
"type": "https://blank.build/docs/reference/errors#rate_limit_unavailable",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Webhooks
Update a webhook endpoint
Updates an owned endpoint using optimistic concurrency.
PATCH
/
webhook-endpoints
/
{endpointId}
Update a webhook endpoint
curl --request PATCH \
--url https://api.blank.build/api/v2/webhook-endpoints/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'if-match: <if-match>' \
--data '
{
"eventTypes": [],
"name": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.blank.build/api/v2/webhook-endpoints/{endpointId}"
payload = {
"eventTypes": [],
"name": "<string>",
"url": "<string>"
}
headers = {
"idempotency-key": "<idempotency-key>",
"if-match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'idempotency-key': '<idempotency-key>',
'if-match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({eventTypes: [], name: '<string>', url: '<string>'})
};
fetch('https://api.blank.build/api/v2/webhook-endpoints/{endpointId}', 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.blank.build/api/v2/webhook-endpoints/{endpointId}",
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([
'eventTypes' => [
],
'name' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"if-match: <if-match>"
],
]);
$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.blank.build/api/v2/webhook-endpoints/{endpointId}"
payload := strings.NewReader("{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("if-match", "<if-match>")
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.patch("https://api.blank.build/api/v2/webhook-endpoints/{endpointId}")
.header("idempotency-key", "<idempotency-key>")
.header("if-match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blank.build/api/v2/webhook-endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["if-match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTypes\": [],\n \"name\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"eventTypes": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"url": "<string>",
"version": 123
}{
"code": "precondition_invalid",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 400,
"title": "Invalid precondition",
"type": "https://blank.build/docs/reference/errors#precondition_invalid",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "invalid_api_key",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 401,
"title": "Invalid API key",
"type": "https://blank.build/docs/reference/errors#invalid_api_key",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "insufficient_scope",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 403,
"title": "Insufficient scope",
"type": "https://blank.build/docs/reference/errors#insufficient_scope",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "webhook_endpoint_not_found",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 404,
"title": "Webhook endpoint not found",
"type": "https://blank.build/docs/reference/errors#webhook_endpoint_not_found",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "idempotency_key_reused",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 409,
"title": "Idempotency key reused",
"type": "https://blank.build/docs/reference/errors#idempotency_key_reused",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "precondition_failed",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 412,
"title": "Precondition failed",
"type": "https://blank.build/docs/reference/errors#precondition_failed",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "request_body_too_large",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 413,
"title": "Request body too large",
"type": "https://blank.build/docs/reference/errors#request_body_too_large",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "unsupported_content_type",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 415,
"title": "Unsupported content type",
"type": "https://blank.build/docs/reference/errors#unsupported_content_type",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "webhook_url_disallowed",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 422,
"title": "Webhook URL disallowed",
"type": "https://blank.build/docs/reference/errors#webhook_url_disallowed",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "precondition_required",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 428,
"title": "Precondition required",
"type": "https://blank.build/docs/reference/errors#precondition_required",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "rate_limit_exceeded",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 429,
"title": "Rate limit exceeded",
"type": "https://blank.build/docs/reference/errors#rate_limit_exceeded",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "internal_error",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 500,
"title": "Internal server error",
"type": "https://blank.build/docs/reference/errors#internal_error",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"code": "rate_limit_unavailable",
"detail": "<string>",
"instance": "<string>",
"requestId": "req_0123456789abcdef0123456789abcdef",
"status": 503,
"title": "Rate limiting unavailable",
"type": "https://blank.build/docs/reference/errors#rate_limit_unavailable",
"causes": [
{
"detail": "<string>",
"title": "<string>",
"context": {}
}
],
"context": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Authorizations
Server-side scoped Blank API key. Never embed it in browser or mobile code.
Headers
Required string length:
8 - 128Pattern:
^[\x21-\x7E]+$Example:
"launch-20260809-01"
Pattern:
^"[1-9][0-9]*"$Example:
"\"1\""
Path Parameters
Body
application/json
Required array length:
1 - 11 elementsAvailable options:
build.blank.launch.created.v1, build.blank.launch.confirmed.v1, build.blank.trade.confirmed.v1, build.blank.staking.position.updated.v1, build.blank.fee.distribution.created.v1, build.blank.prediction.submitted.v1, build.blank.prediction.round.locked.v1, build.blank.prediction.round.settled.v1, build.blank.presale.updated.v1, build.blank.audience-export.completed.v1, build.blank.operation.failed.v1 Required string length:
1 - 80Available options:
active, disabled Response
Updated endpoint.
Required array length:
1 - 11 elementsAvailable options:
build.blank.launch.created.v1, build.blank.launch.confirmed.v1, build.blank.trade.confirmed.v1, build.blank.staking.position.updated.v1, build.blank.fee.distribution.created.v1, build.blank.prediction.submitted.v1, build.blank.prediction.round.locked.v1, build.blank.prediction.round.settled.v1, build.blank.presale.updated.v1, build.blank.audience-export.completed.v1, build.blank.operation.failed.v1 Required string length:
1 - 80Available options:
active, disabled ⌘I