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

# Push a notification

> Push a notification to the owner's inbox. Requires the `notifications:write` scope.



## OpenAPI

````yaml /api-reference/openapi.json post /api/notifications
openapi: 3.1.0
info:
  title: ego API
  version: 0.0.0
  description: >-
    Preview specification for the ego API. ego sits between your data and the
    agents that read it, granting access one scope at a time. Each endpoint
    requires the native scope named in its description, granted on the consent
    screen and carried on the bearer token.
servers:
  - url: https://api.myego.dev
    description: Preview — not yet live
security:
  - bearerAuth: []
paths:
  /api/notifications:
    post:
      tags:
        - Notifications
      summary: Push a notification
      description: >-
        Push a notification to the owner's inbox. Requires the
        `notifications:write` scope.
      operationId: createNotification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationCreate'
      responses:
        '201':
          description: The notification was created.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                properties:
                  id:
                    type: string
                    description: Identifier of the created notification.
                    examples:
                      - k1799wxyz
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    NotificationCreate:
      type: object
      required:
        - title
        - body
        - type
      properties:
        title:
          type: string
          examples:
            - Backup complete
        body:
          type: string
          examples:
            - The nightly backup finished in 4m12s.
        type:
          type: string
          description: App-defined category for the notification.
          examples:
            - backup
        data:
          type: object
          description: Optional structured payload carried with the notification.
          additionalProperties: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A human-readable error message.
          examples:
            - Unauthorized
  responses:
    BadRequest:
      description: The request was malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad request
    Unauthorized:
      description: The token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The token lacks the scope this endpoint requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your ego access token as a bearer token: `Authorization: Bearer
        <token>`. The token carries the scopes granted on the consent screen.

````