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

# Reconcile the curated partner event feed

> Returns a replayable, access-scoped feed for webhook gap recovery and backfills. Webhooks are the primary delivery mechanism. Save each event sequence and use nextCursor as after when reconciling.



## OpenAPI

````yaml /openapi.json get /api/public/v1/events
openapi: 3.1.0
info:
  title: Sparkles partner API
  version: 1.0.0
  description: Create promotional credit claims and receive attributed lifecycle events.
servers:
  - url: https://sparkles.dev
security: []
paths:
  /api/public/v1/events:
    get:
      tags:
        - partner events
      summary: Reconcile the curated partner event feed
      description: >-
        Returns a replayable, access-scoped feed for webhook gap recovery and
        backfills. Webhooks are the primary delivery mechanism. Save each event
        sequence and use nextCursor as after when reconciling.
      operationId: listPartnerEvents
      parameters:
        - in: query
          name: after
          schema:
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
        - in: query
          name: limit
          schema:
            default: 100
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Events after the supplied cursor
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: credit_claim.created
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                creditAmount:
                                  type: integer
                                  exclusiveMinimum: 0
                                  maximum: 9007199254740991
                                status:
                                  type: string
                                  const: pending
                                createdAt:
                                  type: string
                                claimedAt:
                                  type: 'null'
                              required:
                                - claimId
                                - leadId
                                - variant
                                - creditAmount
                                - status
                                - createdAt
                                - claimedAt
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: credit_claim.claimed
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                creditAmount:
                                  type: integer
                                  exclusiveMinimum: 0
                                  maximum: 9007199254740991
                                status:
                                  type: string
                                  const: claimed
                                createdAt:
                                  type: string
                                claimedAt:
                                  type: string
                              required:
                                - claimId
                                - leadId
                                - variant
                                - creditAmount
                                - status
                                - createdAt
                                - claimedAt
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: project.connected
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                occurredAt:
                                  type: string
                                projectId:
                                  type: string
                                  minLength: 1
                              required:
                                - claimId
                                - leadId
                                - variant
                                - occurredAt
                                - projectId
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: task.started
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                occurredAt:
                                  type: string
                                taskId:
                                  type: string
                                  minLength: 1
                                projectId:
                                  anyOf:
                                    - type: string
                                      minLength: 1
                                    - type: 'null'
                              required:
                                - claimId
                                - leadId
                                - variant
                                - occurredAt
                                - taskId
                                - projectId
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: pull_request.opened
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                occurredAt:
                                  type: string
                                pullRequestId:
                                  type: string
                                  minLength: 1
                                taskId:
                                  type: string
                                  minLength: 1
                                projectId:
                                  anyOf:
                                    - type: string
                                      minLength: 1
                                    - type: 'null'
                              required:
                                - claimId
                                - leadId
                                - variant
                                - occurredAt
                                - pullRequestId
                                - taskId
                                - projectId
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            sequence:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            createdAt:
                              type: string
                            type:
                              type: string
                              const: conversion.paid
                            data:
                              type: object
                              properties:
                                claimId:
                                  type: string
                                  format: uuid
                                  pattern: >-
                                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                leadId:
                                  type: string
                                variant:
                                  type: string
                                occurredAt:
                                  type: string
                                conversionId:
                                  type: string
                                  minLength: 1
                              required:
                                - claimId
                                - leadId
                                - variant
                                - occurredAt
                                - conversionId
                              additionalProperties: false
                          required:
                            - id
                            - sequence
                            - createdAt
                            - type
                            - data
                          additionalProperties: false
                      type: object
                  nextCursor:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - data
                  - nextCursor
                additionalProperties: false
        '400':
          description: Cursor or limit failed validation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '401':
          description: Missing, malformed, revoked, or otherwise invalid API key
          headers:
            WWW-Authenticate:
              required: true
              description: Bearer authentication challenge for the Sparkles partner API
              schema:
                type: string
                description: Bearer authentication challenge for the Sparkles partner API
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: The API key exceeded its distributed per-minute request limit
          headers:
            Retry-After:
              required: true
              description: Seconds until another request may be made
              schema:
                type: string
                pattern: ^\d+$
                description: Seconds until another request may be made
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: The event feed could not be loaded because of an internal error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - partnerApiKey: []
components:
  securitySchemes:
    partnerApiKey:
      type: http
      scheme: bearer
      bearerFormat: spk_live_…
      description: >-
        Long-lived opaque API key minted by an approved user at /api. The secret
        is shown once, stored only as a SHA-256 digest, and disabled immediately
        when either the key or its API access grant is revoked.

````