Skip to main content

Create Distributor

Create a new distributor for a node.

Endpoint: POST /api/v1/integration/distributors/nodes/{node_id}

Authentication: Required (Bearer token)

Required Headers:

Authorization: Bearer <access_token>
X-Target-Server: integration

Path Parameters

ParameterTypeRequiredDescription
node_idstring (UUID)YesNode ID

Request Body

{
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}

Request Parameters

FieldTypeRequiredDescription
metaobjectNoWebhook configuration (optional)
meta.hoststringNoWebhook host URL (required if meta is provided)
meta.pathstringNoWebhook path (required if meta is provided)
meta.methodintegerNoHTTP method (1=GET, 2=POST, etc.)
meta.authenticationobjectNoAuthentication configuration
meta.authentication.typeintegerNoAuthentication type (1=Basic, 2=Token)
meta.authentication.usernamestringNoUsername (required if type=1)
meta.authentication.passwordstringNoPassword (required if type=1)

Note: The meta field is optional. You can create a distributor with or without webhook configuration.

Response

Status: 201 Created

Returns the created distributor object.

{
"id": "39e8003c-6342-4fd3-97a1-3f2a7b437d0a",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
},
"created_at": "2025-12-24T02:16:10.419696+03:00",
"updated_at": "2025-12-24T02:16:10.419696+03:00"
}

Example cURL Request

curl -X POST 'https://<base-url>/api/v1/integration/distributors/nodes/e40efce4-38a3-46c4-a202-e8db95d0409c' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}'