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

# Send a notification to the merchant

> Create an in-app notification delivered to the store owner, also pushed to their devices. Requires the SEND_NOTIFICATIONS scope.

Creates an in-app notification for the store owner and triggers a web/mobile push. The recipient is fixed server-side to the merchant — an app can never target an arbitrary user. Rate limited to 5 notifications per day per installation.


## OpenAPI

````yaml POST /notifications
openapi: 3.1.0
info:
  title: Salesive Apps API — Messaging
  version: 1.0.0
  description: >-
    Read the merchant's notifications and send in-app notifications and
    templated emails on behalf of an installed third-party app. Every endpoint
    authenticates with an installed-app access token (prefix `app_`) and
    requires a specific OAuth scope. The target store is bound to the token
    server-side from the installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /notifications:
    post:
      tags:
        - Notifications
      summary: Send a notification to the merchant
      description: >-
        Create an in-app notification delivered to the store owner (the merchant
        the app acts on behalf of). The recipient is fixed server-side to the
        store owner — an app can never target an arbitrary user. Also triggers a
        web/mobile push to the merchant's devices. Rate limited to 5
        notifications per day per installation. The store is bound to the app
        token server-side from the installation — never send a shop id. Requires
        the `SEND_NOTIFICATIONS` scope.
      operationId: sendNotification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - message
              properties:
                title:
                  type: string
                  description: Short heading for the notification.
                message:
                  type: string
                  description: Body text of the notification.
                type:
                  type: string
                  default: info
                  description: >-
                    Category of the notification (e.g. "info", "order",
                    "urgent"). Defaults to "info". A type of "urgent" is
                    delivered with high push priority.
                url:
                  type: string
                  description: >-
                    Optional deep-link URL the merchant opens when tapping the
                    notification.
                data:
                  type: object
                  additionalProperties: true
                  description: >-
                    Optional arbitrary key/value metadata attached to the
                    notification and forwarded in the push payload.
            example:
              title: Sync complete
              message: Your catalog finished syncing — 128 products updated.
              type: info
              url: https://dashboard.salesive.com/products
              data:
                updated: 128
      responses:
        '200':
          description: The created notification.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Notification'
              example:
                status: 200
                success: true
                message: Notification sent
                data:
                  _id: 66b3f0a1c2d4e5f600112233
                  user: 66a1b2c3d4e5f60011223344
                  shop: 66a0a1b2c3d4e5f600112200
                  title: Sync complete
                  message: Your catalog finished syncing — 128 products updated.
                  type: info
                  url: https://dashboard.salesive.com/products
                  read: false
                  data:
                    updated: 128
                  createdAt: '2026-06-28T09:30:00.000Z'
                  updatedAt: '2026-06-28T09:30:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    Notification:
      type: object
      description: A single in-app notification belonging to the merchant on the store.
      properties:
        _id:
          type: string
          description: The notification id (Mongo ObjectId).
        user:
          type: string
          description: The recipient merchant's user id.
        shop:
          type: string
          description: The store id (bound server-side).
        title:
          type: string
          description: Short heading.
        message:
          type: string
          description: Body text.
        type:
          type: string
          description: Category (e.g. "info", "order", "urgent").
        url:
          type: string
          description: Optional deep-link URL.
        read:
          type: boolean
          description: Whether the notification has been read.
        readAt:
          type: string
          format: date-time
          description: When the notification was marked read, if applicable.
        data:
          type: object
          additionalProperties: true
          description: Arbitrary key/value metadata attached to the notification.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````