> ## 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.

# Search Occurrences

> Requires `notification-occurrence:find-all`. Traceability search.
`q` (alias `search`) takes any identifier: occurrence, notification,
request, provider message, queue event, correlation or idempotency
key, or an email / phone, compared by digest so the raw address never
reaches a query or a log. Notifications matched by `q` that have no
occurrence (raw and template sends of the external API) lead the
first page with `kind: notification`; the rest are `kind:
occurrence`. List filters marked "comma separated" take several
values. Default `page_size` 20.

Without `notification:view-content` every payload value is replaced
by `[redacted]` (keys kept) and notification `data` is null.




## OpenAPI

````yaml api-reference/notification/platform/openapi.yaml GET /notification/occurrence
openapi: 3.0.1
info:
  title: Notification Platform API (admin)
  description: |
    Admin side of the notification platform
    (notification/notification-platform): the event catalog and its channel
    rules, channel rates, the suppression list, the traceability search of
    occurrences, and the resend and retry of a notification.

    **Lists.** Every list takes `page` (default 1) and `page_size` (at most
    100; the default is given on each list), plus the flat filters
    documented on it. The shared list query of the Enterprise client is also
    accepted: `search` (folded into `q`) and `filters`
    (`field|operator|value`, comma separated), where `eq` and `in` become
    the flat key of the same name and `created_at` with `gte` / `lte`
    becomes `created_from` / `created_to`; other operators are ignored and
    an explicit flat key wins over the same key inside `filters`. A
    malformed `filters` answers `400`. Results come in `data`, with
    `paging`.

    **Reasons.** Every write carries a mandatory reason (`change_reason` or
    `reason`). It lands in the audit log with the actor, so the history of a
    record shows who changed what and why. A body that misses it, or has any
    other invalid or unknown field, answers `422` with one `{ code, field,
    message }` per problem (`change-reason-required` for a missing
    `change_reason`, `invalid-field` otherwise).
  version: '2026-11-03'
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:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Notification Event Catalog
    description: Catalog events, their channels, rules and change history.
  - name: Notification Rate
    description: Append-only price of a send by channel, provider and country.
  - name: Notification Suppression
    description: Addresses that no channel sends to until lifted.
  - name: Notification Occurrence
    description: Traceability of every event occurrence and its decisions.
  - name: Notification
    description: Resend and retry of a notification.
paths:
  /notification/occurrence:
    get:
      tags:
        - Notification Occurrence
      summary: Search occurrences
      description: |
        Requires `notification-occurrence:find-all`. Traceability search.
        `q` (alias `search`) takes any identifier: occurrence, notification,
        request, provider message, queue event, correlation or idempotency
        key, or an email / phone, compared by digest so the raw address never
        reaches a query or a log. Notifications matched by `q` that have no
        occurrence (raw and template sends of the external API) lead the
        first page with `kind: notification`; the rest are `kind:
        occurrence`. List filters marked "comma separated" take several
        values. Default `page_size` 20.

        Without `notification:view-content` every payload value is replaced
        by `[redacted]` (keys kept) and notification `data` is null.
      operationId: notificationOccurrenceFindAll
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize20'
        - $ref: '#/components/parameters/Filters'
        - name: order_by
          in: query
          description: >
            `field` or `field:asc|desc` (first pair only). Sortable:
            `completed_at`, `created_at`, `evaluated_at`, `event_key`, `origin`,
            `status`.

            Default: newest `created_at` first. Any other field answers `400`.
          schema:
            type: string
            maxLength: 80
            example: created_at:desc
        - $ref: '#/components/parameters/OrderDirection'
        - name: q
          in: query
          description: Any identifier, or an email / phone.
          schema:
            type: string
            minLength: 1
            maxLength: 320
        - $ref: '#/components/parameters/Search'
        - name: event
          in: query
          description: Event keys or ids, comma separated.
          schema:
            type: string
            example: maihue.onboarding.invited
        - name: domain
          in: query
          description: Event domains, comma separated.
          schema:
            type: string
        - name: category
          in: query
          description: Event categories, comma separated.
          schema:
            type: string
        - name: channel
          in: query
          description: >-
            Decision channels, comma separated (`email`, `in_app`,
            `live_activity`, `push`, `sms`, `whatsapp`).
          schema:
            type: string
            example: email,push
        - name: status
          in: query
          description: >-
            Occurrence statuses, comma separated (`completed`, `evaluated`,
            `failed`, `no-op`, `partially-failed`, `received`, `rejected`).
          schema:
            type: string
        - name: origin
          in: query
          description: Origins, comma separated (`api_key`, `cron`, `system`, `user`).
          schema:
            type: string
        - name: outcome
          in: query
          description: >-
            Decision outcomes, comma separated (`deferred`, `fallback`,
            `queued`, `skipped`, `suppressed`).
          schema:
            type: string
        - name: reason
          in: query
          description: >-
            Decision reasons, comma separated (for example `opted-out`,
            `quiet-hours`, `frequency-capped`, `suppressed-hard-bounce`,
            `no-published-template`).
          schema:
            type: string
        - name: address
          in: query
          description: Recipient email / phone of a decision (compared by digest).
          schema:
            type: string
            minLength: 3
            maxLength: 320
        - name: login
          in: query
          description: Recipient user of a decision.
          schema:
            type: string
            format: uuid
        - name: account
          in: query
          schema:
            type: string
            format: uuid
        - name: api_key
          in: query
          schema:
            type: string
            format: uuid
        - name: gateway
          in: query
          schema:
            type: string
            format: uuid
        - name: template_version
          in: query
          description: Template version a decision rendered.
          schema:
            type: string
            format: uuid
        - name: locale
          in: query
          schema:
            type: string
            minLength: 2
            maxLength: 10
        - name: locale_fallback
          in: query
          description: '`true` keeps the decisions that fell back to another language.'
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: subject_type
          in: query
          schema:
            type: string
            maxLength: 80
        - name: subject_id
          in: query
          schema:
            type: string
            maxLength: 255
        - name: created_from
          in: query
          schema:
            type: string
            format: date-time
        - name: created_to
          in: query
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: One page of occurrences
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PageEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/OccurrenceListItem'
                            - $ref: '#/components/schemas/OccurrenceNotificationItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
    PageSize20:
      name: page_size
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    Filters:
      name: filters
      in: query
      description: |
        Shared list query: `field|eq|value` and `field|in|a,b` map to the
        flat key; `created_at|gte|...` / `created_at|lte|...` map to
        `created_from` / `created_to`.
      schema:
        type: string
        example: channel|eq|email
    OrderDirection:
      name: order_direction
      in: query
      description: Direction of an `order_by` that names none.
      schema:
        type: string
        enum:
          - asc
          - desc
    Search:
      name: search
      in: query
      description: Free text; alias of `q`.
      schema:
        type: string
        maxLength: 120
  schemas:
    PageEnvelope:
      type: object
      properties:
        data:
          type: array
          items: {}
        message:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        paging:
          $ref: '#/components/schemas/Paging'
    OccurrenceListItem:
      allOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - occurrence
            event:
              type: object
              nullable: true
              additionalProperties: true
            decisions_count:
              type: integer
            notifications_count:
              type: integer
        - $ref: '#/components/schemas/Occurrence'
    OccurrenceNotificationItem:
      allOf:
        - type: object
          description: A notification matched by `q` that has no occurrence.
          properties:
            kind:
              type: string
              enum:
                - notification
        - $ref: '#/components/schemas/OccurrenceNotification'
    Meta:
      type: object
      properties:
        correlation:
          type: string
          description: Request correlation id; quote it when reporting an issue.
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    Paging:
      type: object
      properties:
        page:
          type: integer
        page_size:
          type: integer
        total:
          type: integer
        total_pages:
          type: integer
    Occurrence:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
        event_key:
          type: string
          example: maihue.onboarding.invited
        notification_event:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - completed
            - evaluated
            - failed
            - no-op
            - partially-failed
            - received
            - rejected
        reason:
          type: string
          nullable: true
        error:
          type: string
          nullable: true
        origin:
          type: string
          enum:
            - api_key
            - cron
            - system
            - user
        subject_type:
          type: string
          nullable: true
        subject_id:
          type: string
          nullable: true
        account:
          type: string
          format: uuid
          nullable: true
        actor_user:
          type: string
          format: uuid
          nullable: true
        api_key:
          type: string
          format: uuid
          nullable: true
        notification_gateway:
          type: string
          format: uuid
          nullable: true
        notification_request:
          type: string
          format: uuid
          nullable: true
        correlation:
          type: string
          nullable: true
        idempotency_key:
          type: string
          nullable: true
        locale:
          type: string
          nullable: true
        payload:
          description: Event payload; values are `[redacted]` without view-content.
          nullable: true
        payload_schema_version:
          type: integer
          nullable: true
        evaluated_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    OccurrenceNotification:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
        channel:
          $ref: '#/components/schemas/Channel'
        category:
          type: string
        status:
          type: string
        status_reason:
          type: string
          nullable: true
        origin:
          type: string
        external_id:
          type: string
        notification_occurrence:
          type: string
          format: uuid
          nullable: true
        notification_event:
          type: string
          format: uuid
          nullable: true
        notification_gateway:
          type: string
          format: uuid
        notification_request:
          type: string
          format: uuid
          nullable: true
        notification_template_version:
          type: string
          format: uuid
          nullable: true
        user:
          type: string
          format: uuid
          nullable: true
        account:
          type: string
          format: uuid
          nullable: true
        locale:
          type: string
          nullable: true
        locale_fallback:
          type: boolean
          nullable: true
        provider:
          type: string
          nullable: true
        provider_message_id:
          type: string
          nullable: true
        queue_event:
          type: string
          format: uuid
          nullable: true
        resent_from:
          type: string
          format: uuid
          nullable: true
        resent_by:
          type: string
          format: uuid
          nullable: true
        resent_reason:
          type: string
          nullable: true
        cost_amount:
          type: number
          nullable: true
        cost_currency:
          type: string
          nullable: true
        data:
          description: Template data; only with view-content.
          nullable: true
        error:
          type: string
          nullable: true
        last_event:
          type: string
          nullable: true
        last_event_at:
          type: string
          format: date-time
          nullable: true
        send_at:
          type: string
          format: date-time
          nullable: true
        deferred_until:
          type: string
          format: date-time
          nullable: true
        sent_at:
          type: string
          format: date-time
          nullable: true
        delivered_at:
          type: string
          format: date-time
          nullable: true
        opened_at:
          type: string
          format: date-time
          nullable: true
        clicked_at:
          type: string
          format: date-time
          nullable: true
        failed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
    Channel:
      type: string
      enum:
        - email
        - in_app
        - live_activity
        - push
        - sms
        - whatsapp
  responses:
    BadRequest:
      description: Malformed path, query, `filters` or JSON body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, revoked or expired credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The caller lacks the required permission
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: A `secret` API key, `hzk_<env>_<prefix>_<secret>`.

````

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