> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cube.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a scheduled notification

**🔒 Admin only.** Requires administrator privileges — the authenticated principal (API key, embed JWT, or any bearer token) must belong to a user with the admin role.

Creates a scheduled notification — a recurring run of a dashboard whose rendered result is delivered to its recipients. The cadence is set by `scheduleType` plus the relevant time fields (`minute`, `hour`, `dayOfWeek`, `dayOfMonth`) or a raw `customCron` expression when `scheduleType` is `CUSTOM`; `timezone` defaults to UTC. The target `dashboardId` must belong to this deployment, otherwise `404` is returned. The created notification has no recipients — add them via `POST /notifications/{id}/recipients`.


## OpenAPI

````yaml /api-reference/api.yaml post /v1/deployments/{deploymentId}/notifications
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: Embed
  - name: Embed Tenants
paths:
  /v1/deployments/{deploymentId}/notifications:
    post:
      tags:
        - Notifications
      summary: Create a scheduled notification
      operationId: createNotification
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
          description: Numeric id of the deployment that owns the notification.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNotificationInput'
        description: CreateNotificationInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationDto'
          description: ''
components:
  schemas:
    CreateNotificationInput:
      properties:
        customCron:
          oneOf:
            - type: string
              description: Custom cron expression (required if scheduleType is CUSTOM)
            - type: 'null'
        dashboardId:
          description: Dashboard to run on the schedule
          type: integer
        dayOfMonth:
          oneOf:
            - type: integer
              description: Day of month (1-31)
            - type: 'null'
        dayOfWeek:
          oneOf:
            - type: integer
              description: Day of week (0-6, Sunday=0)
            - type: 'null'
        hour:
          oneOf:
            - type: integer
              description: Hour of the day (0-23)
            - type: 'null'
        minute:
          oneOf:
            - type: integer
              description: Minute of the hour (0-59)
            - type: 'null'
        notificationEnabled:
          oneOf:
            - type: boolean
            - type: 'null'
        notificationFormat:
          oneOf:
            - $ref: '#/components/schemas/CreateNotificationInputNotificationFormat'
            - type: 'null'
        scheduleType:
          $ref: '#/components/schemas/CreateNotificationInputScheduleType'
        timezone:
          oneOf:
            - type: string
              description: Timezone for the schedule (e.g. "America/New_York")
            - type: 'null'
      required:
        - dashboardId
        - scheduleType
      type: object
    NotificationDto:
      properties:
        cronExpression:
          type: string
        dashboardId:
          type: integer
        deploymentId:
          type: integer
        humanReadableSchedule:
          description: Human-readable description of the cron schedule
          type: string
        id:
          type: integer
        isEnabled:
          type: boolean
        notificationEnabled:
          type: boolean
        notificationFormat:
          type: string
        timezone:
          type: string
      required:
        - id
        - dashboardId
        - deploymentId
        - cronExpression
        - timezone
        - isEnabled
        - humanReadableSchedule
        - notificationEnabled
        - notificationFormat
      type: object
    CreateNotificationInputNotificationFormat:
      enum:
        - png
        - pdf
      type: string
    CreateNotificationInputScheduleType:
      enum:
        - HOURLY
        - DAILY
        - WEEKLY
        - MONTHLY
        - CUSTOM
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````