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

# Push Notifications

> Send Push Notification



## OpenAPI

````yaml POST /tokens/push
openapi: 3.0.0
info:
  title: Token Management API
  version: 1.0.0
  description: API for managing FCM tokens and sending push notifications.
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /tokens/push:
    post:
      description: Send Push Notification
      parameters:
        - $ref: '#/components/parameters/X-API-KEY'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                title:
                  type: string
                body:
                  type: string
              required:
                - userId
                - title
                - body
      responses:
        '200':
          description: Push notification sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      fcmTokens:
                        type: array
                        items:
                          type: string
                      response:
                        type: object
        '400':
          description: Bad Request - userId, title, and body are required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: FCM token not found for this user
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Internal Server Error - Error sending notification
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
      security:
        - bearerAuth: []
components:
  parameters:
    X-API-KEY:
      name: X-API-KEY
      description: API key required for authentication
      in: header
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````