Create a Notification Channel
Registers a new notification channel for a dock. Notification channels define how and where the dock receives alerts about policy changes, compliance events, and other system notifications.
POST /v1/docks/:dockId/notification-channels
Path Parameters
| Parameter | Type | Description |
|---|
dockId | string | The dock ID |
Request Body
| Parameter | Type | Required | Description |
|---|
type | string | Required | Channel type: email, sms, or webhook |
endpoint | string | Required | The delivery endpoint — an email address, phone number, or webhook URL |
Example Request
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../notification-channels \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"type": "webhook",
"endpoint": "https://hooks.acme-insurance.com/docyard/notifications"
}'
Response
{
"id": "nch_01HQ7A...",
"dockId": "dock_01HQ3K...",
"type": "webhook",
"endpoint": "https://hooks.acme-insurance.com/docyard/notifications"
}
Error Handling
| Status | Condition |
|---|
400 | type is not one of email, sms, or webhook |
400 | endpoint is not a valid email, phone number, or URL for the given type |
401 | Missing or invalid API key |
404 | Dock not found |
For webhook channels, Docyard sends POST requests with a JSON payload to your endpoint. Ensure your webhook URL is publicly accessible and returns a 200 status code to acknowledge receipt.