> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-feat-druid-driver-streaming.mintlify.site/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. Identify the target dashboard with either `dashboardId` (numeric) or `dashboardPublicId` (string) — supply exactly one; it 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: App Theme
  - 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:
          oneOf:
            - type: integer
              description: >-
                Numeric id of the dashboard to run on the schedule. Provide this
                OR dashboardPublicId (exactly one).
            - type: 'null'
        dashboardPublicId:
          oneOf:
            - type: string
              description: >-
                Public id of the dashboard to run on the schedule. Provide this
                OR dashboardId (exactly one).
            - type: 'null'
        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'
        filters:
          oneOf:
            - items:
                $ref: '#/components/schemas/DashboardFilterInput'
              type: array
              description: >-
                Dimension filters applied to the dashboard when the notification
                is rendered (substituted into the screenshot/PDF for every
                recipient).
            - 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'
        timeGrains:
          oneOf:
            - items:
                $ref: '#/components/schemas/DashboardTimeGrainInput'
              type: array
              description: >-
                Time-grain overrides applied to the dashboard when the
                notification is rendered.
            - type: 'null'
        timezone:
          oneOf:
            - type: string
              description: Timezone for the schedule (e.g. "America/New_York")
            - type: 'null'
      required:
        - scheduleType
      type: object
    NotificationDto:
      properties:
        cronExpression:
          type: string
        dashboardId:
          type: integer
        deploymentId:
          type: integer
        filters:
          oneOf:
            - items:
                $ref: '#/components/schemas/DashboardFilter'
              type: array
              description: Dimension filters applied when the notification is rendered.
            - type: 'null'
        humanReadableSchedule:
          description: Human-readable description of the cron schedule
          type: string
        id:
          type: integer
        isEnabled:
          type: boolean
        notificationEnabled:
          type: boolean
        notificationFormat:
          type: string
        timeGrains:
          oneOf:
            - items:
                $ref: '#/components/schemas/DashboardTimeGrain'
              type: array
              description: Time-grain overrides applied when the notification is rendered.
            - type: 'null'
        timezone:
          type: string
      required:
        - id
        - dashboardId
        - deploymentId
        - cronExpression
        - timezone
        - isEnabled
        - humanReadableSchedule
        - notificationEnabled
        - notificationFormat
      type: object
    DashboardFilterInput:
      properties:
        caseSensitive:
          oneOf:
            - description: 'For string filters: whether matching is case-sensitive'
            - type: 'null'
        endInclusive:
          oneOf:
            - description: 'For between filters: whether the end bound is inclusive'
            - type: 'null'
        member:
          description: Dimension path, e.g. "Orders.status"
          pattern: .+\..+
          type: string
        operator:
          oneOf:
            - $ref: '#/components/schemas/DashboardFilterInputOperator'
            - type: 'null'
        startInclusive:
          oneOf:
            - description: 'For between filters: whether the start bound is inclusive'
            - type: 'null'
        value:
          oneOf:
            - description: >-
                Filter value. Omit for is_null / is_not_null; provide a
                2-element [start, end] array for between.
              oneOf:
                - type: string
                - type: number
                - type: boolean
                - type: array
                  items: {}
            - type: 'null'
      required:
        - member
      type: object
    CreateNotificationInputNotificationFormat:
      enum:
        - png
        - pdf
      type: string
    CreateNotificationInputScheduleType:
      enum:
        - HOURLY
        - DAILY
        - WEEKLY
        - MONTHLY
        - CUSTOM
      type: string
    DashboardTimeGrainInput:
      properties:
        grain:
          description: Granularity, e.g. "day", "week", "month"
          type: string
        member:
          description: Time dimension path, e.g. "Orders.created_at"
          pattern: .+\..+
          type: string
      required:
        - member
        - grain
      type: object
    DashboardFilter:
      properties:
        caseSensitive:
          oneOf:
            - {}
            - type: 'null'
        endInclusive:
          oneOf:
            - {}
            - type: 'null'
        member:
          type: string
        operator:
          oneOf:
            - $ref: '#/components/schemas/DashboardFilterOperator'
            - type: 'null'
        startInclusive:
          oneOf:
            - {}
            - type: 'null'
        value:
          oneOf:
            - oneOf:
                - type: string
                - type: number
                - type: boolean
                - type: array
                  items: {}
            - type: 'null'
      required:
        - member
      type: object
    DashboardTimeGrain:
      properties:
        grain:
          type: string
        member:
          type: string
      required:
        - member
        - grain
      type: object
    DashboardFilterInputOperator:
      enum:
        - equals
        - not_equals
        - greater_than
        - greater_than_or_equal
        - less_than
        - less_than_or_equal
        - contains
        - not_contains
        - starts_with
        - not_starts_with
        - ends_with
        - not_ends_with
        - is_null
        - is_not_null
        - between
        - custom
      type: string
    DashboardFilterOperator:
      enum:
        - equals
        - not_equals
        - greater_than
        - greater_than_or_equal
        - less_than
        - less_than_or_equal
        - contains
        - not_contains
        - starts_with
        - not_starts_with
        - ends_with
        - not_ends_with
        - is_null
        - is_not_null
        - between
        - custom
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````