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
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string (UUID) | Yes | Node ID |
Request Body
{
"meta": {
"host": "https://example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
meta | object | No | Webhook configuration (optional) |
meta.host | string | No | Webhook host URL (required if meta is provided) |
meta.path | string | No | Webhook path (required if meta is provided) |
meta.method | integer | No | HTTP method (1=GET, 2=POST, etc.) |
meta.authentication | object | No | Authentication configuration |
meta.authentication.type | integer | No | Authentication type (1=Basic, 2=Token) |
meta.authentication.username | string | No | Username (required if type=1) |
meta.authentication.password | string | No | Password (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"
}
}
}'