Crear una suscripción central
curl --request POST \
--url https://consignado.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
}
'import requests
url = "https://consignado.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)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://consignado.sandbox.lerian.net/v1/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://consignado.sandbox.lerian.net/v1/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([
'endpoint' => '<string>',
'name' => '<string>',
'sink_kind' => '<string>',
'event_types' => [
'<string>'
],
'plan_tier' => '<string>',
'schema_major' => 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://consignado.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))
}HttpResponse<String> response = Unirest.post("https://consignado.sandbox.lerian.net/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://consignado.sandbox.lerian.net/v1/subscriptions")
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 \"endpoint\": \"<string>\",\n \"name\": \"<string>\",\n \"sink_kind\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"plan_tier\": \"<string>\",\n \"schema_major\": 123\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}Crear una suscripción central
Crea una suscripción al hub de streaming para tenant y devuelve el secreto de firma que se mostró una vez. El secreto se muestra exactamente una vez y nunca se puede recuperar; la consola nunca lo almacena.
POST
/
v1
/
subscriptions
Crear una suscripción central
curl --request POST \
--url https://consignado.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
}
'import requests
url = "https://consignado.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)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://consignado.sandbox.lerian.net/v1/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://consignado.sandbox.lerian.net/v1/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([
'endpoint' => '<string>',
'name' => '<string>',
'sink_kind' => '<string>',
'event_types' => [
'<string>'
],
'plan_tier' => '<string>',
'schema_major' => 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://consignado.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))
}HttpResponse<String> response = Unirest.post("https://consignado.sandbox.lerian.net/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://consignado.sandbox.lerian.net/v1/subscriptions")
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 \"endpoint\": \"<string>\",\n \"name\": \"<string>\",\n \"sink_kind\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"plan_tier\": \"<string>\",\n \"schema_major\": 123\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
Bearer token, relayed to the streaming-hub as server-to-server auth.
Idempotency key, forwarded to the hub's idempotency middleware.
Cuerpo
application/json
¿Esta página le ayudó?
⌘I

