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

# Create notification



## OpenAPI

````yaml post /v1/notifications
openapi: 3.0.0
info:
  title: Notification APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com
  - url: https://staging.api.us.aptlydone.com/notification
  - url: https://api.us.aptlydone.com
  - url: https://api.us.aptlydone.com/notification
security: []
tags: []
paths:
  /v1/notifications:
    post:
      tags:
        - notifications
      summary: Create notification
      operationId: NotificationController_createNotification_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNotificationDto'
      responses:
        '201':
          description: The notification has been successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationResponseDtoResponse'
      security:
        - accessToken: []
components:
  schemas:
    CreateNotificationDto:
      type: object
      properties:
        templateKey:
          type: string
          description: The template key for the notification
          example: DELEGATION_ISSUED
        userId:
          type: string
          format: uuid
          description: The user ID who should receive this notification
          example: 550e8400-e29b-41d4-a716-446655440000
        tenantId:
          type: string
          format: uuid
          description: The tenant ID of the user who should receive this notification
          example: 550e8400-e29b-41d4-a716-446655440000
        entityType:
          type: string
          description: The type of entity this notification relates to
          example: delegation
        entityId:
          type: string
          description: The ID of the entity this notification relates to
          example: 9da9a193-7ce8-4540-8020-d22ad2333960
        actionUrl:
          type: string
          description: Optional URL for action button on the notification
          example: https://example.com/delegations/123456
        payload:
          type: object
          description: Optional payload with additional data for the notification
          example:
            delegationName: Q3 Budget Review
            priority: high
        placeholders:
          type: object
          description: Template placeholders to populate in the message
          example:
            delegation_id: ABC123
            user_email: john@example.com
      required:
        - templateKey
        - userId
        - tenantId
        - entityType
        - entityId
        - placeholders
    NotificationResponseDtoResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP Status code
          example: 200
        timestamp:
          type: string
          description: Timestamp of the response
          example: '2026-01-12T09:08:08.140Z'
        message:
          type: string
          description: Response message
          example: Success
        data:
          description: Response data
          allOf:
            - $ref: '#/components/schemas/NotificationResponseDto'
      required:
        - statusCode
        - timestamp
        - message
        - data
    NotificationResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The notification ID
          example: 550e8400-e29b-41d4-a716-446655440002
        tenantId:
          type: string
          description: Tenant ID to filter notifications
          example: 123e4567-e89b-12d3-a456-426614174000
        templateKey:
          type: string
          description: The notification template key
          example: DELEGATION_ISSUED
        category:
          type: string
          description: The notification category
          example: Delegations
        title:
          type: string
          description: The notification title
          example: Delegation Issued
        message:
          type: string
          description: The notification message content
          example: Delegation ABC123 was issued to you. Click to review.
        isActionable:
          type: boolean
          description: Whether the notification is actionable
          example: true
        status:
          type: string
          enum:
            - UNREAD
            - READ
          description: The notification status
          example: UNREAD
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the notification was created
          example: '2023-01-01T12:00:00Z'
        readAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the notification was read, if applicable
          example: '2023-01-02T14:30:00Z'
        userId:
          type: string
          description: The user ID who received this notification
          example: 550e8400-e29b-41d4-a716-446655440000
        entityType:
          type: string
          description: The type of entity this notification relates to
          example: delegation
        entityId:
          type: string
          description: The ID of the entity this notification relates to
          example: '123456'
        actionUrl:
          type: string
          nullable: true
          description: URL for action button on the notification, if applicable
          example: https://example.com/delegations/123456
        payload:
          type: object
          nullable: true
          description: Additional payload data for the notification
          example:
            assignedBy: John Doe
            priority: high
        relativeTime:
          type: string
          description: Relative time for display (e.g. "2 hours ago")
          example: 2 hours ago
      required:
        - id
        - tenantId
        - templateKey
        - category
        - title
        - message
        - isActionable
        - status
        - createdAt
        - userId
        - entityType
        - entityId
        - relativeTime
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````