Create a Webhook Endpoint
curl --request POST \
--url https://public-api.stora.co/2025-09/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My New Webhook",
"api_version": "2025-09",
"url": "https://example.com/new_webhook",
"event_types": [
"credit_note.created"
],
"description": "A new webhook endpoint",
"metadata": {
"source": "zapier",
"external_id": "abc_123"
}
}
'import requests
url = "https://public-api.stora.co/2025-09/webhook_endpoints"
payload = {
"name": "My New Webhook",
"api_version": "2025-09",
"url": "https://example.com/new_webhook",
"event_types": ["credit_note.created"],
"description": "A new webhook endpoint",
"metadata": {
"source": "zapier",
"external_id": "abc_123"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My New Webhook',
api_version: '2025-09',
url: 'https://example.com/new_webhook',
event_types: ['credit_note.created'],
description: 'A new webhook endpoint',
metadata: {source: 'zapier', external_id: 'abc_123'}
})
};
fetch('https://public-api.stora.co/2025-09/webhook_endpoints', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My New Webhook',
'api_version' => '2025-09',
'url' => 'https://example.com/new_webhook',
'event_types' => [
'credit_note.created'
],
'description' => 'A new webhook endpoint',
'metadata' => [
'source' => 'zapier',
'external_id' => 'abc_123'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.stora.co/2025-09/webhook_endpoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/webhook_endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"endpoint": {
"id": "we_c72a94b59dc380a4",
"api_version": "2025-09",
"created_at": "2025-02-22T14:41:00Z",
"creator": {
"id": "app_531844f4c4837d61"
},
"description": "A new webhook endpoint",
"disabled_at": null,
"event_types": [
"credit_note.created"
],
"metadata": {
"source": "zapier",
"external_id": "abc_123"
},
"name": "My New Webhook",
"secret": "01a9d2bc4f2301b5313a961ba198b0b900ea49478f9ba86fc8b409a5703a8131",
"status": "enabled",
"updated_at": "2025-02-22T14:41:00Z",
"url": "https://example.com/new_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"
}
]
}
}Webhook Endpoints
Create a Webhook Endpoint
Create a new webhook endpoint to receive event notifications.
Required authorization scope: public.webhook_endpoint:write
POST
/
2025-09
/
webhook_endpoints
Create a Webhook Endpoint
curl --request POST \
--url https://public-api.stora.co/2025-09/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My New Webhook",
"api_version": "2025-09",
"url": "https://example.com/new_webhook",
"event_types": [
"credit_note.created"
],
"description": "A new webhook endpoint",
"metadata": {
"source": "zapier",
"external_id": "abc_123"
}
}
'import requests
url = "https://public-api.stora.co/2025-09/webhook_endpoints"
payload = {
"name": "My New Webhook",
"api_version": "2025-09",
"url": "https://example.com/new_webhook",
"event_types": ["credit_note.created"],
"description": "A new webhook endpoint",
"metadata": {
"source": "zapier",
"external_id": "abc_123"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My New Webhook',
api_version: '2025-09',
url: 'https://example.com/new_webhook',
event_types: ['credit_note.created'],
description: 'A new webhook endpoint',
metadata: {source: 'zapier', external_id: 'abc_123'}
})
};
fetch('https://public-api.stora.co/2025-09/webhook_endpoints', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My New Webhook',
'api_version' => '2025-09',
'url' => 'https://example.com/new_webhook',
'event_types' => [
'credit_note.created'
],
'description' => 'A new webhook endpoint',
'metadata' => [
'source' => 'zapier',
'external_id' => 'abc_123'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://public-api.stora.co/2025-09/webhook_endpoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/webhook_endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My New Webhook\",\n \"api_version\": \"2025-09\",\n \"url\": \"https://example.com/new_webhook\",\n \"event_types\": [\n \"credit_note.created\"\n ],\n \"description\": \"A new webhook endpoint\",\n \"metadata\": {\n \"source\": \"zapier\",\n \"external_id\": \"abc_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"endpoint": {
"id": "we_c72a94b59dc380a4",
"api_version": "2025-09",
"created_at": "2025-02-22T14:41:00Z",
"creator": {
"id": "app_531844f4c4837d61"
},
"description": "A new webhook endpoint",
"disabled_at": null,
"event_types": [
"credit_note.created"
],
"metadata": {
"source": "zapier",
"external_id": "abc_123"
},
"name": "My New Webhook",
"secret": "01a9d2bc4f2301b5313a961ba198b0b900ea49478f9ba86fc8b409a5703a8131",
"status": "enabled",
"updated_at": "2025-02-22T14:41:00Z",
"url": "https://example.com/new_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"
}
]
}
}Authorizations
BearerOAuth2
Bearer Token necessary to use API
Body
application/json
Create Webhook Endpoint Request
The name of the webhook endpoint
The API version for the webhook endpoint
Available options:
2025-09, preview The URL to which the webhook payloads will be delivered
Pattern:
^https://A list of event types that the webhook endpoint will listen to
Minimum array length:
1Available 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.overdue, invoice.paid, invoice.payment_failed, invoice.updated, note.created, note.updated, opportunity.archived, opportunity.associated, opportunity.created, opportunity.deleted, opportunity.unarchived, opportunity.updated, order.abandoned, order.completed, order.created, order.finalized, price_adjustment.cancelled, price_adjustment.created, price_adjustment.failed, price_adjustment.invoiced, price_adjustment.rescheduled, price_adjustment.scheduled, price_adjustment.updated, 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 Optional description for the webhook endpoint
Set of key-value pairs for storing additional information on the webhook endpoint. Learn more about metadata.
Show child attributes
Show child attributes
Was this page helpful?