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

# Create Notification

> Create a new notification configuration.

**Required Role:** ADMIN or OWNER

**Tier Limits:**
- Free Tier: Maximum 1 notification configuration
- Pro Tier: Maximum 25 notification configurations

Supports event-driven notifications for:
- Task execution events (started, completed, failed, status changed)
- Task events (created, updated, deleted, status changed)
- Secret events (created, updated, deleted)
- Location events (created, updated, deleted)
- Usage events (threshold reached - requires `threshold_gb` in event_filters)

**Usage Threshold Example:**
```json
{
    "name": "500GB Alert",
    "event_type": "usage_threshold_reached",
    "event_filters": {"threshold_gb": 500},
    "apprise_url": "slack://token"
}
```



## OpenAPI

````yaml POST /v1/teams/{team_id}/notifications
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/notifications:
    post:
      tags:
        - Notifications
      summary: Create Notification Config
      description: >-
        Create a new notification configuration.


        **Required Role:** ADMIN or OWNER


        **Tier Limits:**

        - Free Tier: Maximum 1 notification configuration

        - Pro Tier: Maximum 25 notification configurations


        Supports event-driven notifications for:

        - Task execution events (started, completed, failed, status changed)

        - Task events (created, updated, deleted, status changed)

        - Secret events (created, updated, deleted)

        - Location events (created, updated, deleted)

        - Usage events (threshold reached - requires `threshold_gb` in
        event_filters)


        **Usage Threshold Example:**

        ```json

        {
            "name": "500GB Alert",
            "event_type": "usage_threshold_reached",
            "event_filters": {"threshold_gb": 500},
            "apprise_url": "slack://token"
        }

        ```
      operationId: create_notification_config_v1_teams__team_id__notifications_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationConfigCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationConfigResponse'
        '400':
          description: Invalid configuration data or vault error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    NotificationConfigCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        event_type:
          $ref: '#/components/schemas/NotificationEventType'
        event_filters:
          additionalProperties: true
          type: object
          title: Event Filters
        apprise_url:
          type: string
          maxLength: 2048
          minLength: 1
          title: Apprise Url
          description: Apprise URL (e.g., slack://token)
        message_template:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Message Template
          description: Jinja2 template for notification message
        is_enabled:
          type: boolean
          title: Is Enabled
          default: true
      type: object
      required:
        - name
        - event_type
        - apprise_url
      title: NotificationConfigCreate
      description: Schema for creating a notification config
    NotificationConfigResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        team_id:
          type: string
          format: uuid
          title: Team Id
        name:
          type: string
          title: Name
        event_type:
          type: string
          title: Event Type
        event_filters:
          additionalProperties: true
          type: object
          title: Event Filters
        message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Template
        is_enabled:
          type: boolean
          title: Is Enabled
        apprise_vault_secret_id:
          type: string
          format: uuid
          title: Apprise Vault Secret Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
      type: object
      required:
        - id
        - team_id
        - name
        - event_type
        - event_filters
        - message_template
        - is_enabled
        - apprise_vault_secret_id
        - created_at
        - updated_at
      title: NotificationConfigResponse
      description: Schema for notification config API responses
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NotificationEventType:
      type: string
      enum:
        - task_execution_started
        - task_execution_completed
        - task_execution_failed
        - task_execution_cancelled
        - task_created
        - task_updated
        - task_deleted
        - task_status_changed
        - secret_created
        - secret_updated
        - secret_deleted
        - location_created
        - location_updated
        - location_deleted
        - api_key_created
        - api_key_rotated
        - api_key_revoked
        - api_key_deleted
      title: NotificationEventType
      description: Supported notification event types
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````