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

# Send a human a one-way notification

> Send a human a one-way notification, fire-and-forget.

No reply is expected and nothing blocks. With a named channel the message is
sent and the call returns as soon as the medium ACCEPTED it (not that a human
saw it). With ``channel`` omitted the message is recorded to the internal
notifications sink the Studio inbox reads. One send attempt, no retry; every
failure raises loudly, never a silent no-op:

* a blank message, an unknown channel name, a blank recipient/audience, or a
  caller-supplied ``sender_identity`` → 400;
* a restricted caller addressing another identity (cross-identity denial) → 403;
* a channel that cannot notify → 501;
* a channel delivery failure → 502.

``audience`` addresses the in-app record to an identity's feed; it is honored
even when a channel also delivers the message (channel push AND in-app record).
``sender_identity`` is the sending identity a channel message leaves FROM, which the
conversation bridge sets on the notification it builds to answer a route; a caller may
not supply it here and a set value is rejected loudly, never forwarded to the channel.

Returns a short confirmation string — ``"notification sent via '<channel>'"``
for a channel send, ``"notification recorded to the internal sink"`` otherwise.



## OpenAPI

````yaml /openapi.json post /api/notifications
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/notifications:
    post:
      tags:
        - notifications
      summary: Send a human a one-way notification
      description: >-
        Send a human a one-way notification, fire-and-forget.


        No reply is expected and nothing blocks. With a named channel the
        message is

        sent and the call returns as soon as the medium ACCEPTED it (not that a
        human

        saw it). With ``channel`` omitted the message is recorded to the
        internal

        notifications sink the Studio inbox reads. One send attempt, no retry;
        every

        failure raises loudly, never a silent no-op:


        * a blank message, an unknown channel name, a blank recipient/audience,
        or a
          caller-supplied ``sender_identity`` → 400;
        * a restricted caller addressing another identity (cross-identity
        denial) → 403;

        * a channel that cannot notify → 501;

        * a channel delivery failure → 502.


        ``audience`` addresses the in-app record to an identity's feed; it is
        honored

        even when a channel also delivers the message (channel push AND in-app
        record).

        ``sender_identity`` is the sending identity a channel message leaves
        FROM, which the

        conversation bridge sets on the notification it builds to answer a
        route; a caller may

        not supply it here and a set value is rejected loudly, never forwarded
        to the channel.


        Returns a short confirmation string — ``"notification sent via
        '<channel>'"``

        for a channel send, ``"notification recorded to the internal sink"``
        otherwise.
      operationId: post_api_notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotifyUser'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    NotifyUser:
      description: >-
        A notification to send: the ``message`` text, an optional named
        ``channel``

        that carries it (omit to record to the internal sink), an optional
        per-call

        ``recipient`` delivery address, and an optional ``audience`` identity
        whose in-app

        inbox shows it (honored even with a channel set; distinct from
        ``recipient``).
      properties:
        audience:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The identity (user_id) whose in-app inbox shows this (honored even
            with a channel set); leave unset for an operator/broadcast
            notification. Distinct from recipient, which is a channel delivery
            address.
          title: Audience
        channel:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Channel
        message:
          title: Message
          type: string
        recipient:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Recipient
        sender_identity:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Reserved: the sending identity a channel message leaves FROM, set by
            the conversation bridge on the notification it builds to answer a
            route. Callers MUST NOT supply it here — a set value is rejected
            with a 400, never forwarded.
          title: Sender Identity
      required:
        - message
      title: NotifyUser
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````