# Create a notification node `POST /api/v1/notification_nodes` Creates a notification node. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Notification nodes → Write**. ## Body parameters - `scope` (string, required) — Use med for medical certificates, doc for documents, birthday for birthdays, or payments for payment reminders. - `channel` (string, required) — Use email or sms. SMS requires the SMS module and an SMS template. - `when_type` (string, required) — Unit for the notification timing. Use years, months, weeks, days, or hours. - `when_num` (integer, required) — Non-negative number of timing units. - `template_id` (integer, required) — ID of the message template. - `is_active` (boolean) — Whether this rule is active. Defaults to true when creating it. - `send_to_atleti` (boolean) — Target athletes. Alias send_to_athletes. - `send_to_genitori` (boolean) — Target parents. Alias send_to_parents. - `send_to_coach` (boolean) — Target coaches. Alias send_to_coaches. - `send_to_staff` (boolean) — Target staff. - `cc_emails` (array of strings, string, or null) — Additional email recipients. A string can separate addresses with commas or semicolons. Use null to clear. - `birthday_subject` (string) — Use athlete, coach, or staff for birthday notifications. Defaults to athlete. - `send_to_subject` (boolean) — Send a coach or staff birthday notification to that person. Defaults to true. Provide an eligible recipient. Payment reminders require athletes or parents. For coach or staff birthdays, target the subject or provide additional addresses for email. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/notification_nodes" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"scope":"doc","channel":"email","when_type":"days","when_num":14,"template_id":17,"send_to_genitori":true,"is_active":false}' ``` ## Response **201 Created** The created notification node is returned in data. Example with fictional data and selected fields. ```json { "message_key": "entities.notification_node.messages.created", "data": { "id": 8, "scope": "doc", "channel": "email", "when_type": "days", "when_num": 14, "sort_key_seconds": 1209600, "recipient_mask": 2, "birthday_subject": "athlete", "send_to_subject": 1, "template_id": 17, "is_active": 0, "cc_emails": null, "tsc": 1794564000, "tsu": 1794564000 } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The request body must be a JSON object. - `422` — One or more fields failed validation.