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

# OneSignal Event Streams

> Fails closed: without a configured secret, hosted environments answer
`401`. Unset Liquid variables arrive as empty strings and are read as
missing. `timestamp` accepts ISO 8601 (`{{ event.datetime }}`) or
UNIX seconds (`{{ event.timestamp }}`).




## OpenAPI

````yaml api-reference/notification/onesignal-webhook/openapi.yaml POST /integration/onesignal/webhook
openapi: 3.0.1
info:
  title: OneSignal Event Streams Webhook
  description: |
    Intake of OneSignal Event Streams (ADR 0106, D-09). Each OneSignal app
    (default and Maihue Lunch) has one Event Stream that posts here with
    `Authorization: Bearer <secret>`; the secret tells which app sent the
    event. Push (`message.push.*`), SMS (`message.sms.*`) and live activity
    (`message.live_activity.*`) events are queued and stored on the
    notification whose `provider_message_id` is the event's `message_id`;
    other kinds are acknowledged and ignored. A repeated `id` is not queued
    again. The body template lives in the notification center cutover
    runbook.
  version: '2026-10-21'
servers:
  - description: Production
    url: https://api.bbrands.io/api/v3
  - description: Certification
    url: https://certification.api.bbrands.io/api/v3
  - description: Development
    url: https://development.api.bbrands.io/api/v3
security:
  - oneSignalBearer: []
tags:
  - name: Integration
    description: Provider webhooks.
paths:
  /integration/onesignal/webhook:
    post:
      tags:
        - Integration
      summary: Receive a OneSignal event
      description: |
        Fails closed: without a configured secret, hosted environments answer
        `401`. Unset Liquid variables arrive as empty strings and are read as
        missing. `timestamp` accepts ISO 8601 (`{{ event.datetime }}`) or
        UNIX seconds (`{{ event.timestamp }}`).
      operationId: integrationOneSignalWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OneSignalEvent'
            example:
              kind: message.push.clicked
              id: 6f2a1f4e-6c1b-4b8e-9d0e-5f6f7a8b9c0d
              timestamp: '2026-10-21T14:05:12.228Z'
              external_id: 1d0c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d
              subscription_id: 9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d
              device_type: iOSPush
              message_id: 0c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f
              failure_reason: ''
              app: default
      responses:
        '200':
          description: Accepted (queued), already processed, or ignored kind
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accepted:
                        type: boolean
                      kind:
                        type: string
                      queued:
                        type: boolean
                  message:
                    type: string
        '400':
          description: The body is not JSON
        '401':
          description: >-
            Missing or wrong Bearer secret, or no secret configured on a hosted
            environment
        '422':
          description: The body misses `kind`, `id` or a valid `timestamp`
components:
  schemas:
    OneSignalEvent:
      type: object
      required:
        - kind
        - id
        - timestamp
      properties:
        kind:
          type: string
          maxLength: 60
          description: '`{{ event.kind }}`'
          example: message.push.received
        id:
          type: string
          maxLength: 255
          description: '`{{ event.id }}`; the dedupe key.'
        timestamp:
          oneOf:
            - type: string
            - type: integer
          description: '`{{ event.datetime }}` or `{{ event.timestamp }}`.'
        external_id:
          type: string
          description: '`{{ event.external_id }}` (Horizon user id).'
        subscription_id:
          type: string
          description: '`{{ event.subscription_id }}`.'
        device_type:
          type: string
          description: '`{{ event.subscription_device_type }}`.'
        message_id:
          type: string
          description: >-
            `{{ message.id }}`; matched against
            `notification.provider_message_id`.
        failure_reason:
          type: string
          description: '`{{ event.data.failure_reason }}`.'
        app:
          type: string
          enum:
            - default
            - lunch
          description: Informative; the authenticated secret decides the app.
  securitySchemes:
    oneSignalBearer:
      type: http
      scheme: bearer
      description: |
        `INTEGRATION_ONESIGNAL_WEBHOOK_SECRET` (default app) or
        `INTEGRATION_ONESIGNAL_LUNCH_WEBHOOK_SECRET` (Lunch app).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.