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

# Reopen a resolved gap



## OpenAPI

````yaml https://app.pepline.ai/api/v1/openapi.yaml delete /knowledge_gaps/{id}/resolution
openapi: 3.1.0
info:
  title: pepline API
  version: '1'
  description: |
    The pepline knowledge ingestion API: push knowledge into your
    organization's library from your own systems — CMS hooks, sync scripts,
    Zapier/Make/n8n scenarios — and keep whole websites fresh. One inbound
    API instead of N connectors; you own the trigger, we own idempotency.
servers:
  - url: https://app.pepline.ai/api/v1
security:
  - bearerAuth: []
tags:
  - name: Organization
    description: The identity behind your key — confirm it works and read your agent slugs.
  - name: Knowledge sources
    description: >-
      Push and sync the knowledge your agents stand on — text, files, pages,
      whole websites.
  - name: Knowledge facts
    description: >-
      Triage the atomic knowledge your sources yielded — review, edit, archive,
      tier, per-agent scoping.
  - name: Knowledge gaps
    description: >-
      The questions leads asked that your material could not answer — resolve or
      dismiss them.
  - name: Ingestion instructions
    description: >-
      "Look for" asks — what the reader should specifically capture on a source,
      a page, or around a fact.
  - name: Agents
    description: List and provision agents, and tune each agent's widget settings.
  - name: Conversations
    description: >-
      Read the conversations your agents have held — transcripts, captured
      answers, verdicts.
  - name: Services
    description: The offerings your agents present and reason about.
  - name: Fit criteria
    description: What makes a good or poor lead — the signals your agents qualify against.
  - name: Voice profiles
    description: How your agents sound — tone, formality, phrasing.
  - name: Identities
    description: >-
      The personas your agents act as for outward operations — sender name,
      address, signature.
  - name: Prompt templates
    description: >-
      Versioned prompt bodies per kind — author a new version, activate any
      prior one.
  - name: Deliverable templates
    description: >-
      The A/B variants of the wrap-up document — sections and guidance per
      variant.
  - name: Flow
    description: >-
      Author an agent's conversation — its phases and the answers each one
      captures.
  - name: Catalog
    description: >-
      Draft services, voice, and fit criteria from your knowledge, then accept
      or dismiss the proposals.
  - name: Onboarding
    description: >-
      Where the organization stands with setup — stage, blockers, what awaits
      review.
paths:
  /knowledge_gaps/{id}/resolution:
    delete:
      tags:
        - Knowledge gaps
      summary: Reopen a resolved gap
      operationId: reopenKnowledgeGap
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: The reopened gap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeGap'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: integer
  schemas:
    KnowledgeGap:
      type: object
      required:
        - object
        - id
        - agent
        - question
        - occurrences
        - status
        - created_at
      properties:
        object:
          type: string
          const: knowledge_gap
        id:
          type: integer
        agent:
          type: string
          description: Agent slug.
        question:
          type: string
        occurrences:
          type: integer
        status:
          type: string
          enum:
            - open
            - resolved
            - archived
        resolution_basis:
          type:
            - string
            - 'null'
          enum:
            - verified
            - declared
            - null
          description: >-
            How the resolution was earned: verified (an answer check confirmed
            the agent can answer) or declared (the owner's word). Null while
            open.
        conversation_id:
          type:
            - integer
            - 'null'
          description: The latest conversation that asked it.
        conversations:
          type: array
          description: Every time the question was asked, newest first.
          items:
            type: object
            properties:
              conversation_id:
                type:
                  - integer
                  - 'null'
              asked_at:
                type: string
                format: date-time
        knowledge_source_id:
          type:
            - integer
            - 'null'
          description: >-
            The source added to answer this gap, when one was (dashboard, or
            `knowledge_gap_id` on source creation).
        resurfaced_from_id:
          type:
            - integer
            - 'null'
          description: >-
            The resolved gap this one came back from — the question returned
            despite the fix.
        last_check:
          type:
            - object
            - 'null'
          description: The latest answer check (owner-triggered or run by ingestion).
          properties:
            checked_at:
              type: string
              format: date-time
            trigger:
              type: string
              enum:
                - owner
                - ingestion
            answerable:
              type: boolean
            answer:
              type: string
              description: The reply a visitor would get, when answerable.
            reason:
              type: string
              enum:
                - not_indexed
                - nothing_reachable
                - fenced_only
              description: Why no judgement was made.
            error:
              type: string
              description: Present when the check could not run (provider unavailable).
            reachable:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - passage
                      - fact
                  id:
                    type: integer
                  text:
                    type: string
                  source_id:
                    type:
                      - integer
                      - 'null'
                  source_title:
                    type:
                      - string
                      - 'null'
                  band:
                    type: string
                    enum:
                      - close
                      - related
                      - fenced
        last_asked_at:
          type:
            - string
            - 'null'
          format: date-time
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - invalid_request_error
                - rate_limit_error
                - api_error
            code:
              type: string
              enum:
                - missing_api_key
                - invalid_api_key
                - resource_missing
                - method_not_allowed
                - resource_archived
                - idempotency_conflict
                - parameter_invalid
                - parameter_missing
                - parameter_unknown
                - organization_required
                - organization_paused
                - rate_limited
                - flow_invalid
                - organization_unverified
                - experiment_running
                - resource_in_use
                - not_revertible
                - credits_exhausted
                - internal
            message:
              type: string
            param:
              type: string
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource in your organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped;
        treat them like passwords.

````