Create webhook subscription
curl --request POST \
--url https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": [
"INCORPORATION_ISSUE_CREATED",
"INCORPORATION_ISSUE_RESOLVED"
]
}
'import requests
url = "https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions"
payload = {
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": ["INCORPORATION_ISSUE_CREATED", "INCORPORATION_ISSUE_RESOLVED"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://partner.example.com/commenda/webhooks',
eventTypes: ['INCORPORATION_ISSUE_CREATED', 'INCORPORATION_ISSUE_RESOLVED']
})
};
fetch('https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions', 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.prod.commenda.io/api/v1/partner/webhook-subscriptions",
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([
'url' => 'https://partner.example.com/commenda/webhooks',
'eventTypes' => [
'INCORPORATION_ISSUE_CREATED',
'INCORPORATION_ISSUE_RESOLVED'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.prod.commenda.io/api/v1/partner/webhook-subscriptions"
payload := strings.NewReader("{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.prod.commenda.io/api/v1/partner/webhook-subscriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"webhookSubscription": {
"id": "whsub_123",
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": [],
"status": "ACTIVE",
"secretPreview": "whsec_...c123",
"createdAt": "2026-04-25T21:00:00.000Z",
"secret": "whsec_abc123"
}
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}Webhooks
Create webhook subscription
Create a partner-level webhook subscription for incorporation issue events. The full signing secret is returned only in this create response.
POST
/
partner
/
webhook-subscriptions
Create webhook subscription
curl --request POST \
--url https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": [
"INCORPORATION_ISSUE_CREATED",
"INCORPORATION_ISSUE_RESOLVED"
]
}
'import requests
url = "https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions"
payload = {
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": ["INCORPORATION_ISSUE_CREATED", "INCORPORATION_ISSUE_RESOLVED"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://partner.example.com/commenda/webhooks',
eventTypes: ['INCORPORATION_ISSUE_CREATED', 'INCORPORATION_ISSUE_RESOLVED']
})
};
fetch('https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions', 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.prod.commenda.io/api/v1/partner/webhook-subscriptions",
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([
'url' => 'https://partner.example.com/commenda/webhooks',
'eventTypes' => [
'INCORPORATION_ISSUE_CREATED',
'INCORPORATION_ISSUE_RESOLVED'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.prod.commenda.io/api/v1/partner/webhook-subscriptions"
payload := strings.NewReader("{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.prod.commenda.io/api/v1/partner/webhook-subscriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://partner.example.com/commenda/webhooks\",\n \"eventTypes\": [\n \"INCORPORATION_ISSUE_CREATED\",\n \"INCORPORATION_ISSUE_RESOLVED\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"webhookSubscription": {
"id": "whsub_123",
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": [],
"status": "ACTIVE",
"secretPreview": "whsec_...c123",
"createdAt": "2026-04-25T21:00:00.000Z",
"secret": "whsec_abc123"
}
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}{
"statusCode": 403,
"message": "Company does not belong to this affiliate firm",
"error": "Forbidden"
}Creates a partner-level webhook subscription.
The response includes the full
secret exactly once. Store it securely and use it to verify webhook signatures. Later reads return only secretPreview.
Webhook URLs must use HTTPS and must be reachable on public addresses.
Example
curl --request POST \
--url 'https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions' \
--header 'content-type: application/json' \
--header 'x-api-key: <partner_api_key>' \
--data '{
"url": "https://partner.example.com/commenda/webhooks",
"eventTypes": [
"INCORPORATION_ISSUE_CREATED",
"INCORPORATION_ISSUE_RESOLVED"
]
}'
Authorizations
Body
application/json
HTTPS webhook URL reachable on a public address.
Example:
"https://partner.example.com/commenda/webhooks"
Minimum array length:
1Partner webhook event type. Commenda may add additional event types in future API updates.
Available options:
INCORPORATION_ISSUE_CREATED, INCORPORATION_ISSUE_RESOLVED Response
Webhook subscription created successfully
Show child attributes
Show child attributes
Was this page helpful?
⌘I