Skip to main content

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

ParameterTypeDescription
dockIdstringThe dock ID

Request Body

ParameterTypeRequiredDescription
typestringRequiredChannel type: email, sms, or webhook
endpointstringRequiredThe 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

StatusCondition
400type is not one of email, sms, or webhook
400endpoint is not a valid email, phone number, or URL for the given type
401Missing or invalid API key
404Dock 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.