Create a hub subscription
curl --request POST \
--url https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "<string>",
"name": "<string>",
"sink_kind": "<string>",
"event_types": [
"<string>"
],
"plan_tier": "<string>",
"schema_major": 123
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions"
payload := strings.NewReader("{\n \"endpoint\": \"<string>\",\n \"name\": \"<string>\",\n \"sink_kind\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"plan_tier\": \"<string>\",\n \"schema_major\": 123\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoint: '<string>',
name: '<string>',
sink_kind: '<string>',
event_types: ['<string>'],
plan_tier: '<string>',
schema_major: 123
})
};
fetch('https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions"
payload = {
"endpoint": "<string>",
"name": "<string>",
"sink_kind": "<string>",
"event_types": ["<string>"],
"plan_tier": "<string>",
"schema_major": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"signingSecret": "<string>",
"subscription": {
"created_at": "2026-01-15T12:00:00Z",
"enabled": true,
"endpoint": "https://hooks.example.com/ingest",
"id": "0192f1a0-0000-7000-8000-00000000c001",
"name": "orders-webhook",
"plan_tier": "standard",
"signature_version": 1,
"sink_kind": "webhook",
"updated_at": "2026-01-15T12:00:00Z",
"verification_state": "active",
"delegated_scope": "Rk9ORE8tQQ==",
"event_types": [
"<string>"
],
"schema_major": 2
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Create a hub subscription
Creates a streaming-hub subscription for the tenant and returns the once-shown signing secret. The secret is shown exactly once and is never re-fetchable; the console never stores it.
POST
/
v1
/
subscriptions
Create a hub subscription
curl --request POST \
--url https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "<string>",
"name": "<string>",
"sink_kind": "<string>",
"event_types": [
"<string>"
],
"plan_tier": "<string>",
"schema_major": 123
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions"
payload := strings.NewReader("{\n \"endpoint\": \"<string>\",\n \"name\": \"<string>\",\n \"sink_kind\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"plan_tier\": \"<string>\",\n \"schema_major\": 123\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoint: '<string>',
name: '<string>',
sink_kind: '<string>',
event_types: ['<string>'],
plan_tier: '<string>',
schema_major: 123
})
};
fetch('https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://br-consignado-gw.sandbox.lerian.net/v1/subscriptions"
payload = {
"endpoint": "<string>",
"name": "<string>",
"sink_kind": "<string>",
"event_types": ["<string>"],
"plan_tier": "<string>",
"schema_major": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"signingSecret": "<string>",
"subscription": {
"created_at": "2026-01-15T12:00:00Z",
"enabled": true,
"endpoint": "https://hooks.example.com/ingest",
"id": "0192f1a0-0000-7000-8000-00000000c001",
"name": "orders-webhook",
"plan_tier": "standard",
"signature_version": 1,
"sink_kind": "webhook",
"updated_at": "2026-01-15T12:00:00Z",
"verification_state": "active",
"delegated_scope": "Rk9ORE8tQQ==",
"event_types": [
"<string>"
],
"schema_major": 2
}
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Bearer token, relayed to the streaming-hub as server-to-server auth.
Idempotency key, forwarded to the hub's idempotency middleware.
Body
application/json
Was this page helpful?

