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

# Enviar notificación

> Envía notificación push (y opcionalmente WhatsApp). Requiere `x-client-id`.
Exactamente uno de `phones`, `accountIDs` o `accountTypeIDs` debe estar presente.




## OpenAPI

````yaml openapi/external-v1.yaml post /notification/send
openapi: 3.1.0
info:
  title: Goil Public API (External)
  description: >
    API pública para integraciones externas. Permite autenticación, gestión de
    cuentas

    y envío de notificaciones y alertas.


    **Autenticación**: La mayoría de endpoints requieren el header `x-client-id`
    (businessId).

    Tras llamar a `POST /authentication/login` obtendrás un `accessToken` para
    usar en

    endpoints que requieran Bearer token (p. ej. alertas).
  version: 1.0.0
  contact:
    name: Goil API Support
servers:
  - url: https://community.goil.app/api/v1/external
    description: Production
security: []
tags:
  - name: Authentication
    description: Login para integraciones externas
  - name: Account
    description: Crear, consultar, listar, actualizar y eliminar cuentas
  - name: Notification
    description: Envío de notificaciones push/SMS
  - name: Alert
    description: Creación y actualización de alertas geolocalizadas
paths:
  /notification/send:
    post:
      tags:
        - Notification
      summary: Enviar notificación
      description: >
        Envía notificación push (y opcionalmente WhatsApp). Requiere
        `x-client-id`.

        Exactamente uno de `phones`, `accountIDs` o `accountTypeIDs` debe estar
        presente.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationSendRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSendResponse'
        '422':
          description: Invalid arguments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    NotificationSendRequest:
      type: object
      required:
        - message
      properties:
        message:
          $ref: '#/components/schemas/NotificationMessage'
        phones:
          type: array
          items:
            type: string
          description: Lista de teléfonos (solo uno de phones, accountIDs o accountTypeIDs)
        accountIDs:
          type: array
          items:
            type: string
          description: IDs de cuentas
        accountTypeIDs:
          type: array
          items:
            type: string
          description: IDs de tipo de cuenta (envío masivo por tipo)
        hiddenFromList:
          type: boolean
          default: false
        senderAccountId:
          type: string
        metadata:
          type: object
          properties:
            sectionId:
              type: string
      description: >-
        Exactamente uno de phones, accountIDs o accountTypeIDs debe estar
        presente
    NotificationSendResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            msg:
              type: string
    ErrorResponse:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
        error:
          type: string
        data:
          type: object
          nullable: true
    NotificationMessage:
      type: object
      required:
        - title
        - body
      properties:
        title:
          type: string
        body:
          type: string
        url:
          type: string
        sendWhatsApp:
          type: boolean

````