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

# List events

> Webhook events for your keys in the current mode, newest first, with each event's delivery state. Use it to reconcile after downtime or when you suspect a missed event.



## OpenAPI

````yaml /api-reference/openapi.json get /events
openapi: 3.1.0
info:
  title: Prescience Partner API
  version: 1.1.0
  description: >-
    Create employer groups, submit census records, generate preliminary
    market-rate quotes, create iframe sessions, create enrollments, and read
    aggregate account data.


    Money is always integer cents. Dates are `YYYY-MM-DD`; timestamps are ISO
    8601 UTC. Final pricing, eligibility, network availability, and plan
    documents are confirmed during underwriting and onboarding. A BAA and data
    processing agreement are executed before live mode is enabled.
  contact:
    name: Prescience partner engineering
    email: partners@getprescience.com
servers:
  - url: https://www.getprescience.com/api/partner/v1
    description: >-
      Production. Test and live traffic share this host; mode comes from your
      API key.
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Connectivity and key checks.
  - name: Plans
    description: Static plan metadata.
  - name: Groups
    description: 'Employer groups: the root resource of every integration.'
  - name: Census
    description: Pre-enrollment census intake and ongoing member sync.
  - name: Quotes
    description: >-
      Preliminary quotes built from the stored census and current local
      market-plan snapshot.
  - name: Enrollments
    description: Plan selection and employer provisioning.
  - name: Account
    description: Aggregate, de-identified employer account data.
  - name: Webhooks
    description: Signed event delivery (standard-webhooks scheme).
paths:
  /events:
    get:
      tags:
        - Webhooks
      summary: List events
      description: >-
        Webhook events for your keys in the current mode, newest first, with
        each event's delivery state. Use it to reconcile after downtime or when
        you suspect a missed event.
      operationId: listEvents
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - ping
              - quote.finalized
              - enrollment.created
              - group.state_changed
              - census.processed
              - group.market_rates_ready
              - group.market_rates_failed
          description: Only events of this type.
      responses:
        '200':
          description: A page of events.
          content:
            application/json:
              schema:
                type: object
                required:
                  - events
                  - count
                  - nextCursor
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEventWithDelivery'
                  count:
                    type: integer
                  nextCursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Pass as `?cursor=` for the next page. `null` on the last
                      page.
              example:
                events:
                  - id: evt_7c1d22e09b54
                    type: census.processed
                    createdAt: '2026-06-10T17:15:09Z'
                    mode: test
                    data:
                      groupId: grp_8c2f41d09a3e
                      received: 12
                      accepted: 12
                      memberCount: 12
                      errorCount: 0
                    delivery:
                      status: delivered
                      attempts: 1
                      lastAttemptAt: '2026-06-10T17:15:10Z'
                      lastStatusCode: 200
                      nextAttemptAt: null
                      deliveredAt: '2026-06-10T17:15:10Z'
                count: 1
                nextCursor: null
        '400':
          description: Unknown `type`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Page size. Default 50, max 200.
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    Cursor:
      name: cursor
      in: query
      required: false
      description: >-
        Opaque cursor from a previous page's `nextCursor`. Lists are
        newest-first.
      schema:
        type: string
  schemas:
    WebhookEventWithDelivery:
      allOf:
        - $ref: '#/components/schemas/WebhookEvent'
        - type: object
          required:
            - delivery
          properties:
            delivery:
              $ref: '#/components/schemas/WebhookDelivery'
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - unauthorized
            - live_mode_disabled
            - forbidden
            - not_found
            - conflict
            - rates_pending
            - quote_expired
            - market_unavailable
            - census_required
            - rate_limited
            - server_error
            - not_configured
            - email_not_allowed
            - verification_failed
          description: >-
            Stable machine-readable error code. `email_not_allowed` and
            `verification_failed` come only from the iframe's own endpoints,
            which partners do not call.
        message:
          type: string
          description: >-
            Human-readable explanation. Wording may change; branch on `error`,
            not `message`.
        details:
          type: array
          description: Present on `invalid_request`. One entry per failed field.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                example: zip
              message:
                type: string
                example: zip must be a 5-digit ZIP code
              index:
                type: integer
                description: >-
                  For array payloads (census rows), the zero-based index of the
                  failing row.
                example: 7
    WebhookEvent:
      type: object
      required:
        - id
        - type
        - createdAt
        - mode
        - data
      properties:
        id:
          type: string
          description: >-
            Event ID. Also sent as the `webhook-id` header and part of the
            signed content.
          example: evt_9b21c7e4f60a
        type:
          type: string
          enum:
            - ping
            - quote.finalized
            - enrollment.created
            - group.state_changed
            - census.processed
            - group.market_rates_ready
            - group.market_rates_failed
        createdAt:
          type: string
          format: date-time
        mode:
          type: string
          enum:
            - test
            - live
        data:
          type: object
          description: Event-specific payload.
    WebhookDelivery:
      type: object
      required:
        - status
        - attempts
      properties:
        status:
          type: string
          enum:
            - pending
            - delivered
            - failed
            - dead
          description: >-
            `pending`: not yet attempted. `delivered`: your endpoint returned
            2xx. `failed`: the last attempt failed; `nextAttemptAt` says when it
            retries, or is null when no webhook was registered at the time.
            `dead`: retries exhausted; use redeliver.
        attempts:
          type: integer
        lastAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
        lastStatusCode:
          type:
            - integer
            - 'null'
        nextAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
        deliveredAt:
          type:
            - string
            - 'null'
          format: date-time
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: >-
              Provide a valid partner API key as `Authorization: Bearer
              psk_...`.
    RateLimited:
      description: Rate limit exceeded. Honor `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limited
            message: Too many requests. Please retry later.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
          example: 12
    ServerError:
      description: >-
        Something failed on our side. Safe to retry with the same
        `Idempotency-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: server_error
            message: Internal error. The request was not applied.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Partner API key. `psk_test_<32 hex>` for test mode, `psk_live_<32 hex>`
        for live mode. Store them in your secrets manager on issue. Live keys
        are shown once; the scoped partner portal can show an active sandbox key
        again.

````