Lucent Issues API

The Issues API from Lucent — 2 operation(s) for issues.

OpenAPI Specification

lucent-issues-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Lucent Insights Issues API
  description: HTTP APIs for Lucent. The Data API reads Lucent data and updates issue status. The Ingest API receives rrweb batches from the @lucenthq/sdk browser package and custom integrations built on top of the same contract.
  license:
    name: MIT
  version: 0.1.0
servers:
- url: https://app.lucenthq.com
  description: Production app
tags:
- name: Issues
paths:
  /api/v1/issues:
    get:
      summary: List issues
      description: Lists issues visible to the bearer token's organization, ordered by `createdAt` descending and then `id` descending.
      operationId: listIssues
      security:
      - lucentBearer: []
      parameters:
      - $ref: '#/components/parameters/LimitIssues'
      - $ref: '#/components/parameters/Cursor'
      - name: status
        in: query
        required: false
        description: Filter issues by status.
        schema:
          $ref: '#/components/schemas/IssueStatus'
      responses:
        '200':
          description: Issues page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListIssuesResponse'
        '400':
          $ref: '#/components/responses/DataBadRequest'
        '401':
          $ref: '#/components/responses/DataUnauthorized'
        '429':
          $ref: '#/components/responses/DataRateLimited'
      tags:
      - Issues
  /api/v1/issues/{issueId}:
    get:
      summary: Get an issue
      description: Fetches a single issue by UUID for the bearer token's organization.
      operationId: getIssue
      security:
      - lucentBearer: []
      parameters:
      - $ref: '#/components/parameters/IssueId'
      responses:
        '200':
          description: Issue details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetIssueResponse'
        '400':
          $ref: '#/components/responses/DataBadRequest'
        '401':
          $ref: '#/components/responses/DataUnauthorized'
        '404':
          $ref: '#/components/responses/DataIssueNotFound'
        '429':
          $ref: '#/components/responses/DataRateLimited'
      tags:
      - Issues
    patch:
      summary: Update issue status
      description: 'Updates an issue''s status. The operation is idempotent: setting the current status again returns `200` with the unchanged issue.'
      operationId: updateIssueStatus
      security:
      - lucentBearer: []
      parameters:
      - $ref: '#/components/parameters/IssueId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - status
              properties:
                status:
                  $ref: '#/components/schemas/IssueStatus'
      responses:
        '200':
          description: Updated issue details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetIssueResponse'
        '400':
          $ref: '#/components/responses/DataBadRequest'
        '401':
          $ref: '#/components/responses/DataUnauthorized'
        '403':
          $ref: '#/components/responses/DataForbidden'
        '404':
          $ref: '#/components/responses/DataIssueNotFound'
        '429':
          $ref: '#/components/responses/DataRateLimited'
      tags:
      - Issues
components:
  schemas:
    ListIssuesResponse:
      type: object
      required:
      - issues
      - nextCursor
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/IssueSummary'
        nextCursor:
          type: string
          nullable: true
    IssueSummary:
      type: object
      required:
      - id
      - title
      - description
      - status
      - priority
      - previewUrl
      - createdAt
      - sessionCount
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        description:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/IssueStatus'
        priority:
          $ref: '#/components/schemas/IssuePriority'
        previewUrl:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        sessionCount:
          type: integer
          minimum: 0
        ticketProvider:
          type: string
          nullable: true
        ticketUrl:
          type: string
          nullable: true
        ticketIdentifier:
          type: string
          nullable: true
    Issue:
      allOf:
      - $ref: '#/components/schemas/IssueSummary'
      - type: object
        required:
        - updatedAt
        properties:
          stepsToReplicate:
            type: string
            nullable: true
          aiVerified:
            type: boolean
            nullable: true
          updatedAt:
            type: string
            format: date-time
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
    GetIssueResponse:
      type: object
      required:
      - issue
      properties:
        issue:
          $ref: '#/components/schemas/Issue'
    IssuePriority:
      type: string
      enum:
      - low
      - medium
      - high
      - critical
    IssueStatus:
      type: string
      enum:
      - unresolved
      - ticket_created
      - transient
      - resolved
  responses:
    DataIssueNotFound:
      description: The issue was not found in the token's organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    DataForbidden:
      description: The bearer token is valid but lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    DataRateLimited:
      description: Rate limit exceeded. Reads allow 300 requests per minute; writes allow 60 requests per minute.
      headers:
        Retry-After:
          description: Seconds until the rate limit resets.
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          description: Limit for the current window.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in the current window.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp when the current window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    DataUnauthorized:
      description: Missing, malformed, revoked, or unknown bearer token.
      headers:
        WWW-Authenticate:
          description: Bearer challenge with the required scope.
          schema:
            type: string
            example: Bearer scope="read:lucent"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    DataBadRequest:
      description: Invalid request parameter or body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    IssueId:
      name: issueId
      in: path
      required: true
      description: Issue UUID.
      schema:
        type: string
        format: uuid
        example: 87b3a6b6-5af5-438b-a39c-eff148a68ccb
    Cursor:
      name: cursor
      in: query
      required: false
      description: Opaque pagination cursor returned as `nextCursor` from the previous page.
      schema:
        type: string
    LimitIssues:
      name: limit
      in: query
      required: false
      description: Maximum issues to return.
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 25
  securitySchemes:
    lucentApiKey:
      type: apiKey
      in: header
      name: X-Lucent-Api-Key
      description: Public key prefixed with `luc_pk_`. Safe to expose in client-side code. For `navigator.sendBeacon` callers that cannot set headers, the key may also be passed as the `api_key` query parameter.
    lucentBearer:
      type: http
      scheme: bearer
      description: API keys prefixed with `luc_api_` or OAuth access tokens prefixed with `luc_oat_`. Legacy static keys prefixed with `luc_mcp_` continue to work.