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

# Update flow-level settings

> Flow-level knobs. `idle_minutes`: minutes of visitor silence before the conversation pauses (idle-abandoned; the visitor can resume it for 7 days). Minimum 10; null = never pauses. Trial-compiles; applies to conversations started afterwards.




## OpenAPI

````yaml https://app.pepline.ai/api/v1/openapi.yaml patch /agents/{agent_slug}/flow
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:
  /agents/{agent_slug}/flow:
    patch:
      tags:
        - Flow
      summary: Update flow-level settings
      description: >
        Flow-level knobs. `idle_minutes`: minutes of visitor silence before the
        conversation pauses (idle-abandoned; the visitor can resume it for 7
        days). Minimum 10; null = never pauses. Trial-compiles; applies to
        conversations started afterwards.
      operationId: updateFlow
      parameters:
        - name: agent_slug
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - flow
              properties:
                flow:
                  $ref: '#/components/schemas/FlowInput'
      responses:
        '200':
          description: The updated flow.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Flow'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/Invalid'
components:
  schemas:
    FlowInput:
      type: object
      properties:
        idle_minutes:
          type:
            - integer
            - 'null'
          minimum: 10
    Flow:
      type: object
      required:
        - object
        - agent
        - name
        - version
        - phases
      properties:
        object:
          type: string
          const: flow
        agent:
          type: string
        name:
          type: string
        version:
          type: integer
        archetype:
          type:
            - string
            - 'null'
        idle_minutes:
          type:
            - integer
            - 'null'
          description: >-
            Minutes of visitor silence before the conversation pauses
            (reopenable for 7 days). null = never.
        phases:
          type: array
          items:
            $ref: '#/components/schemas/FlowState'
    FlowState:
      type: object
      required:
        - object
        - id
        - key
        - title
        - position
        - kind
        - objective
        - exit_criteria
        - max_turns
        - tool_settings
        - archived
        - slots
      properties:
        object:
          type: string
          const: flow_state
        id:
          type: integer
        key:
          type: string
        title:
          type: string
        position:
          type: integer
        kind:
          type: string
          enum:
            - step
            - loop
            - terminal
        objective:
          type: string
        exit_criteria:
          type: string
        max_turns:
          type: integer
        tools:
          type: array
          items:
            type: string
        tool_settings:
          type: object
          description: >-
            Effective settings of the tools that are on, keyed by tool, defaults
            filled: {offer_navigation: {max_links: 1..3}} (page buttons one
            reply may carry, default 1). Tools without settings do not appear.
          additionalProperties:
            type: object
            additionalProperties:
              type: integer
        archived:
          type: boolean
        slots:
          type: array
          items:
            $ref: '#/components/schemas/InformationSlot'
    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
    InformationSlot:
      type: object
      required:
        - object
        - id
        - key
        - title
        - data_type
        - archived
      properties:
        object:
          type: string
          const: information_slot
        id:
          type: integer
        key:
          type: string
          description: >-
            lowercase letters, digits, underscores; the extraction-schema
            property + slot_values key.
        title:
          type:
            - string
            - 'null'
          description: Owner-facing label (the chip group header).
        data_type:
          type: string
          enum:
            - string
            - enum
            - band
            - multi_enum
            - boolean
            - email
        required:
          type: boolean
        enum_values:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Required for enum/band; the chip values.
        enum_labels:
          type: object
          description: value → display label.
        translations:
          type: object
          description: locale → { title, enum_labels } overrides.
        description:
          type:
            - string
            - 'null'
          description: LLM-facing extraction guidance (not shown to visitors).
        archived:
          type: boolean
  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'
    Invalid:
      description: Validation failed — `error.param` names the field.
      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.

````