Skip to main content
PATCH
/
2025-09
/
webhook_endpoints
/
{webhook_endpoint_id}
Update a Webhook Endpoint
curl --request PATCH \
  --url https://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Webhook Name",
  "url": "https://example.com/updated_webhook",
  "event_types": [
    "credit_note.created"
  ],
  "description": "An updated webhook endpoint",
  "metadata": {
    "source": "updated"
  }
}
'
import requests

url = "https://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_id}"

payload = {
"name": "Updated Webhook Name",
"url": "https://example.com/updated_webhook",
"event_types": ["credit_note.created"],
"description": "An updated webhook endpoint",
"metadata": { "source": "updated" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Webhook Name',
url: 'https://example.com/updated_webhook',
event_types: ['credit_note.created'],
description: 'An updated webhook endpoint',
metadata: {source: 'updated'}
})
};

fetch('https://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_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://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_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([
'name' => 'Updated Webhook Name',
'url' => 'https://example.com/updated_webhook',
'event_types' => [
'credit_note.created'
],
'description' => 'An updated webhook endpoint',
'metadata' => [
'source' => 'updated'
]
]),
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://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_id}"

payload := strings.NewReader("{\n \"name\": \"Updated Webhook Name\",\n \"url\": \"https://example.com/updated_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"An updated webhook endpoint\",\n \"metadata\": {\n \"source\": \"updated\"\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Webhook Name\",\n \"url\": \"https://example.com/updated_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"An updated webhook endpoint\",\n \"metadata\": {\n \"source\": \"updated\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://public-api.stora.co/2025-09/webhook_endpoints/{webhook_endpoint_id}")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Webhook Name\",\n \"url\": \"https://example.com/updated_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"An updated webhook endpoint\",\n \"metadata\": {\n \"source\": \"updated\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "endpoint": {
    "id": "we_195h6kfm9ro15lof",
    "api_version": "2025-09",
    "created_at": "2025-02-22T14:41:00Z",
    "creator": {
      "id": "staff_06778802edebb94d"
    },
    "description": "An updated webhook endpoint",
    "disabled_at": null,
    "event_types": [
      "credit_note.created"
    ],
    "metadata": {
      "source": "updated"
    },
    "name": "Updated Webhook Name",
    "secret": null,
    "status": "enabled",
    "updated_at": "2025-02-22T14:41:00Z",
    "url": "https://example.com/updated_webhook"
  },
  "meta": {
    "request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
    "curies": [
      {
        "name": "bo",
        "href": "https://app.stora.test{rel}",
        "templated": true,
        "title": "Backoffice"
      },
      {
        "name": "sf",
        "href": "https://acme.stora.test{rel}",
        "templated": true,
        "title": "Storefront"
      }
    ]
  }
}
{
"error": {
"code": "forbidden",
"details": [],
"links": [
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors"
}
],
"message": "This webhook endpoint is managed by Zapier and cannot be modified through this access token",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}
{
"error": {
"code": "resource_not_found",
"details": [],
"links": [
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors"
}
],
"message": "The Webhook/Endpoint was not found.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}

Authorizations

Authorization
string
header
required

Bearer Token necessary to use API

Path Parameters

webhook_endpoint_id
string
required

The public ID of the webhook endpoint to retrieve

Body

application/json

Update Webhook Endpoint Request

name
string

The name of the webhook endpoint

description
string | null

Optional description for the webhook endpoint

url
string<uri>

The URL to which the webhook payloads will be delivered

Pattern: ^https://
event_types
enum<string>[]

A list of event types that the webhook endpoint will listen to

Minimum array length: 1
Available options:
contact.churned,
contact.converted,
contact.created,
contact.updated,
contract.created,
contract.signed,
coupon.created,
coupon.updated,
credit_note.created,
credit_note.updated,
deal.created,
deal.lost,
deal.reopened,
deal.stage_changed,
deal.updated,
deal.won,
identity_verification.cancelled,
identity_verification.failed,
identity_verification.processing,
identity_verification.succeeded,
invoice.created,
invoice.finalized,
invoice.marked_uncollectible,
invoice.paid,
invoice.updated,
note.created,
note.updated,
order.abandoned,
order.completed,
order.created,
order.finalized,
protection_level.created,
protection_level.updated,
subscription.cancelled,
subscription.created,
subscription.ended,
subscription.resumed,
subscription.started,
task.completed,
task.created,
task.reopened,
task.updated,
tenancy.auto_reservation.failed,
tenancy.auto_reservation.partially_succeeded,
tenancy.auto_reservation.succeeded,
tenancy.created,
tenancy.started,
unit.available,
unit.created,
unit.deallocated,
unit.occupied,
unit.overlocked,
unit.repossessed,
unit.reserved,
unit.unavailable,
unit.updated,
unit_type.created,
unit_type.updated
metadata
object | null

Set of key-value pairs for storing additional information on the webhook endpoint. Learn more about metadata.

Response

webhook endpoint updated

Single Webhook Endpoint

endpoint
object

Webhook Endpoint

meta
object