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

# Update a context

> All fields optional; an absent one is left untouched. An empty string clears `description`/`guide`, and `{}` clears the manifest back to defaults.



## OpenAPI

````yaml https://raw.githubusercontent.com/pinecone-io/pinecone-api/refs/heads/main/2026-07/nexus_data_2026-07.oas.yaml put /contexts/{slug}
openapi: 3.0.3
info:
  title: Nexus API
  description: >
    Nexus turns a set of sources into a queryable, self-improving knowledge
    base. A context is **sources + a manifest**: upload sources, **curate** them
    into a searchable index, then query it. The manifest, one validated JSON
    document, defines how the context indexes, retrieves and answers.


    Curate is explicit — nothing is queryable until you run it. `{slug}` accepts
    a context's slug or its UUID. Query with `POST /api/query`, one turn per
    call, and read the answer from `output[].content[].text`; multi-turn
    conversations are sessions. Tasks are project-owned at `/api/tasks`, not
    nested under contexts.
  contact:
    name: Pinecone Support
    url: https://support.pinecone.io
    email: support@pinecone.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 2026-07
servers:
  - url: https://{host}/api
    description: Your Nexus deployment host
    variables:
      host:
        default: api.example.com
        description: Host of your Nexus deployment.
security:
  - bearerAuth: []
  - apiKey: []
tags:
  - name: Auth
    description: Login and identity.
  - name: Project
    description: The active Pinecone project and its disclosure state.
  - name: Contexts
    description: A context is sources + a manifest. Curate it explicitly before querying.
  - name: Manifest
    description: Manifest templates and the per-context manifest.
  - name: Source Files
    description: >-
      Per-context source imports (upload, connector, public repo) and the source
      file tree.
  - name: Knowledge
    description: Read-only browse of curated knowledge (chunks + artifacts).
  - name: Curation
    description: Curate workflow trigger, curation ledger, and version-pin primitives.
  - name: Connectors
    description: >-
      Project-level links to external source providers (Box, ...). Linked via
      OAuth or an API key, then used to import source documents into a context.
  - name: Query
    description: >-
      The unified KnowQL Query API: run a query turn (`/query`), fetch a turn
      (`/queries/{id}`), inspect its trace, manage feedback, comparison flags,
      and multi-turn sessions (`/sessions`).
  - name: Tasks
    description: >-
      Top-level, project-owned task records for every workflow (optimize,
      curate, search, work, explore, profile, import, pack, restore, groom).
  - name: Task Files
    description: Read, list, and delete files from live or archived task containers.
paths:
  /contexts/{slug}:
    put:
      tags:
        - Contexts
      summary: Update a context
      description: >-
        All fields optional; an absent one is left untouched. An empty string
        clears `description`/`guide`, and `{}` clears the manifest back to
        defaults.
      operationId: update_context
      parameters:
        - in: path
          name: slug
          description: Context slug or UUID.
          required: true
          schema:
            type: string
          style: simple
        - in: header
          name: X-Pinecone-Api-Version
          description: >-
            Date-based contract version, echoed back on the same header. Omit
            for the default (`2026-07`); send `unstable` for the in-development
            surface. An unrecognized value is rejected with `400
            unsupported_api_version`.
          schema:
            default: 2026-07
            x-enum:
              - 2026-07
              - unstable
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContextRequest'
        required: true
      responses:
        '200':
          description: The updated context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Slug conflict
components:
  schemas:
    UpdateContextRequest:
      description: >-
        All fields optional. Empty string for description/guide clears it; `{}`
        for manifest clears it back to defaults. Absent leaves untouched. `kind`
        is immutable and cannot be updated.
      type: object
      properties:
        slug:
          description: Renames the context. Must stay unique within the project.
          type: string
        name:
          description: New display name.
          type: string
        description:
          description: New summary. Empty string clears it.
          type: string
        guide:
          description: New standing instructions. Empty string clears them.
          type: string
        manifest:
          $ref: '#/components/schemas/Manifest'
    ContextResponse:
      description: >-
        What context endpoints return — the stored context plus the lifecycle
        flags derived from its in-flight tasks.
      type: object
      properties:
        id:
          description: Stable UUID. Accepted anywhere `{slug}` is.
          type: string
        slug:
          description: URL-safe name, unique within the project. Mutable via `PUT`.
          type: string
        name:
          description: Human-readable display name.
          type: string
        kind:
          $ref: '#/components/schemas/ContextKind'
        workspace:
          description: Owning workspace. Absent off a workspace-enabled cluster.
          type: string
        created_by:
          description: Principal that created the context.
          type: string
        description:
          nullable: true
          description: Free-text summary of what the context holds.
          type: string
        guide:
          description: >-
            High-level standing instructions the query runtime reads on every
            turn.
          type: string
        manifest:
          description: >-
            Pinned manifest document. Absent when the context runs on validator
            defaults.
          allOf:
            - $ref: '#/components/schemas/Manifest'
        semantic_index:
          nullable: true
          description: >-
            Host of the index backing this context's vector retrieval. Null
            until a curate resolves one.
          type: string
        keyword_index:
          nullable: true
          description: >-
            Host of the index backing keyword retrieval. The same host as
            `semantic_index` today — the two names are separate seams over one
            index.
          type: string
        is_optimizing:
          description: An optimize task is in flight.
          type: boolean
        optimize_task_id:
          nullable: true
          description: The optimize task — the running one, or the last to finish.
          type: string
        optimize_score:
          nullable: true
          description: Eval pass rate the last optimize's best iteration scored.
          type: number
          format: double
        optimize_iterations:
          nullable: true
          description: How many candidate manifests the last run tried.
          type: integer
        last_optimized_at:
          nullable: true
          description: When an optimize last persisted a tuned manifest.
          type: string
          format: date-time
        last_curated_at:
          nullable: true
          description: When a curate last flipped a new index version live.
          type: string
          format: date-time
        has_sources:
          description: The source tree holds at least one file. False blocks curate.
          type: boolean
        last_source_import_at:
          nullable: true
          description: When sources were last staged by an upload or import.
          type: string
          format: date-time
        is_curating:
          description: A curate task is in flight.
          type: boolean
        curate_task_id:
          nullable: true
          description: The curate task — the running one, or the last to finish.
          type: string
        is_importing:
          description: An import task is in flight.
          type: boolean
        import_task_id:
          nullable: true
          description: The import task — the running one, or the last to finish.
          type: string
        is_exploring:
          description: An explore task is in flight.
          type: boolean
        explore_task_id:
          nullable: true
          description: The explore task — the running one, or the last to finish.
          type: string
        is_restoring:
          description: A restore task is in flight.
          type: boolean
        restore_task_id:
          nullable: true
          description: The restore task — the running one, or the last to finish.
          type: string
        manifest_suggestion:
          $ref: '#/components/schemas/ManifestSuggestion'
        sample_queries:
          description: >-
            Example questions the curated corpus can answer, written by the last
            curate.
          type: array
          items:
            description: One example question.
            type: string
        is_grooming:
          description: A groom task is in flight. Work contexts only.
          type: boolean
        groom_task_id:
          description: The groom task — the running one, or the last to finish.
          type: string
        groom_artifact_count:
          description: Artifacts the last groom left in the work context.
          type: integer
          format: int64
        last_groomed_at:
          description: When a groom last consolidated the work context.
          type: string
          format: date-time
        created_at:
          description: When the context was created.
          type: string
          format: date-time
        updated_at:
          description: When the context last changed.
          type: string
          format: date-time
        stats:
          description: Aggregate task counters. Populated only on the list endpoint.
          allOf:
            - $ref: '#/components/schemas/ContextStats'
      required:
        - id
        - slug
        - name
        - kind
        - created_by
        - description
        - is_optimizing
        - has_sources
        - is_curating
        - is_importing
        - is_exploring
        - is_restoring
        - is_grooming
        - created_at
        - updated_at
    Error:
      description: The error envelope every non-2xx response uses.
      type: object
      properties:
        message:
          description: >-
            Human-readable explanation. Not stable — branch on `code`, not on
            this.
          type: string
        code:
          description: >-
            Stable machine-readable code, present only on errors a client must
            branch on. 
          x-enum:
            - unsupported_api_version
            - preview_not_enabled
            - preview_file_limit
            - preview_byte_limit
            - workspace_host_required
            - workspace_not_found
          type: string
      required:
        - message
    Manifest:
      description: >-
        The document that drives curate and search. Sparse: every field is
        optional and an omitted one falls back to its default, so absent fields
        are omitted rather than nulled. A change reaches the index on the next
        curate; rebuilding what is already indexed needs a forced one.
      type: object
      properties:
        curate:
          $ref: '#/components/schemas/CurateManifest'
        optimize:
          $ref: '#/components/schemas/OptimizeManifest'
        search:
          $ref: '#/components/schemas/SearchManifest'
    ContextKind:
      description: >-
        How the context is built. `search` — built from source documents, and
        must be curated before it can be queried. `work` — built from traces of
        work done, queryable immediately, consolidated by `groom` rather than
        `curate`.
      default: search
      x-enum:
        - search
        - work
      type: string
    ManifestSuggestion:
      description: >-
        Outcome of the last explore run, pinned to the context row. A proposal
        only — apply it by writing the manifest and forcing a curate.
      type: object
      properties:
        matches:
          description: Proposed templates, best fit first.
          type: array
          items:
            $ref: '#/components/schemas/TemplateMatch'
        none:
          description: True when no template fit
          type: boolean
        explored_at:
          description: When the run produced this proposal.
          type: string
          format: date-time
        task_id:
          description: The explore task that produced it.
          type: string
      required:
        - matches
        - none
        - explored_at
    ContextStats:
      description: Aggregate counters over every task this context has ever run.
      type: object
      properties:
        tasks_total:
          description: Tasks this context has ever run.
          type: integer
          format: int64
        tasks_active:
          description: Tasks in a non-terminal state.
          type: integer
          format: int64
        tasks_completed:
          description: Tasks that finished successfully.
          type: integer
          format: int64
        tasks_failed:
          description: Tasks that ended in failure.
          type: integer
          format: int64
        tasks_cancelled:
          description: Runs stopped before they finished.
          type: integer
          format: int64
        tokens_total:
          description: Prompt plus completion tokens across every task.
          type: integer
          format: int64
        runtime_seconds:
          description: Summed container runtime across every task.
          type: integer
          format: int64
      required:
        - tasks_total
        - tasks_active
        - tasks_completed
        - tasks_failed
        - tasks_cancelled
        - tokens_total
        - runtime_seconds
    CurateManifest:
      description: >-
        What curate builds out of the sources — the chunk leg, the artifact leg,
        or both.
      type: object
      properties:
        chunks:
          $ref: '#/components/schemas/ChunksConfig'
        artifacts:
          $ref: '#/components/schemas/ArtifactsConfig'
    OptimizeManifest:
      description: >-
        The scheduled self-tuning loop: it clusters the queries that answered
        badly and tries candidate manifests against an ephemeral index until one
        reproduces the recorded answers.
      type: object
      properties:
        schedule:
          description: Cron expression the tuning loop runs on.
          default: 0 * * * *
          type: string
          maxLength: 128
        latency_threshold_ms:
          description: >-
            A query slower than this counts as a problem worth tuning for, as
            does any query that fell back from artifacts to chunks. `0` disables
            the latency test, leaving only fallback.
          default: 60000
          type: integer
          minimum: 0
          maximum: 600000
        min_group_size:
          description: >-
            How many near-duplicate problem queries must cluster together before
            the loop tunes for them. Keeps a one-off slow query from triggering
            a manifest change.
          default: 2
          type: integer
          minimum: 1
          maximum: 100
        eval_pass_rate_threshold:
          description: >-
            Fraction of eval queries a candidate manifest must answer correctly
            to be considered ready. `1` demands all of them.
          default: 1
          type: number
          format: double
          minimum: 0
          maximum: 1
        max_iterations:
          description: >-
            How many candidate manifests the loop tries before stopping with its
            best.
          default: 20
          type: integer
          minimum: 1
          maximum: 100
    SearchManifest:
      description: >-
        Standing instructions for the query runtime, pinned on the context
        rather than sent per turn.
      type: object
      properties:
        instructions:
          description: >-
            The context's default system prompt, applied to every turn in scope.
            A session's own `system_prompt` appends to it rather than replacing
            it.
          type: string
    TemplateMatch:
      description: One manifest template an explore run proposes for the corpus.
      type: object
      properties:
        template_id:
          description: Catalog entry the run proposes for this corpus.
          type: string
        rationale:
          description: Why the run thinks this template fits the corpus.
          type: string
        confidence:
          description: >-
            How sure the run is, 0–1. Low-confidence proposals are dropped
            before this point.
          type: number
          format: double
      required:
        - template_id
        - rationale
        - confidence
    ChunksConfig:
      description: >-
        The chunk leg — sources split into passages, embedded for semantic
        search and optionally indexed for keyword search.
      type: object
      properties:
        enabled:
          description: Whether curate builds the chunk leg at all.
          default: true
          type: boolean
        embedding_model:
          description: Model that embeds the chunks.
          default: multilingual-e5-large
          type: string
          maxLength: 128
        chunking:
          $ref: '#/components/schemas/ChunkingConfig'
        keyword:
          description: >-
            The lexical index built alongside the vectors, for exact-term
            matching.
          type: object
          properties:
            enabled:
              description: Whether the lexical index is built.
              default: true
              type: boolean
    ArtifactsConfig:
      description: >-
        The artifact leg: knowledge an LLM distills out of the sources, as prose
        files or database rows. Off by default.
      type: object
      properties:
        enabled:
          description: Whether curate extracts artifacts at all.
          default: false
          type: boolean
        artifact_model:
          description: >-
            Model tier that does the extraction. `standard` reads more carefully
            at a higher token cost.
          default: lite
          x-enum:
            - standard
            - lite
          type: string
        artifact_types:
          description: >-
            What kinds of artifact to extract. Nothing is extracted until at
            least one is declared.
          type: array
          items:
            $ref: '#/components/schemas/ArtifactType'
          maxItems: 32
        edge_types:
          description: >-
            Typed, directed relationships between artifact types, which turn the
            artifacts into a graph the agent can traverse.
          type: array
          items:
            $ref: '#/components/schemas/EdgeType'
          maxItems: 32
        min_doc_count:
          description: >-
            How many source documents must mention a corpus-scoped subject
            before it earns an artifact. Raise it to suppress one-off mentions.
            An artifact type may override it.
          default: 1
          type: integer
          minimum: 1
          maximum: 64
        max_tokens:
          description: Output cap for one extracted artifact, in tokens.
          default: 1500
          type: integer
          minimum: 128
          maximum: 8192
        max_doc_chars:
          description: >-
            Input cap for one extraction call, in characters. With windowing off
            this also caps how much of a source is read at all; everything
            beyond it is dropped.
          default: 60000
          type: integer
          minimum: 1000
          maximum: 2000000
        extraction_window_chars:
          description: >-
            Window size for walking a long source across several extraction
            calls, so its back half is covered rather than dropped. `0` opts out
            and reads only the head, up to `max_doc_chars`.
          default: 0
          type: integer
          minimum: 0
          maximum: 1000000
        mention_max_chars:
          description: >-
            Cap on one recorded mention — what a single document says about the
            subject — in characters.
          default: 400
          type: integer
          minimum: 100
          maximum: 4000
        max_mentions_per_artifact:
          description: >-
            How many mentions are fed into the pass that reduces them into one
            corpus-wide artifact.
          default: 40
          type: integer
          minimum: 1
          maximum: 500
        mention_context_chars:
          description: >-
            Cap on those mentions once concatenated, in characters. Applied
            after `max_mentions_per_artifact`.
          default: 8000
          type: integer
          minimum: 1000
          maximum: 100000
        max_artifacts_per_type:
          description: How many artifacts one type may produce. Omit for no cap.
          default: 10000
          type: integer
          minimum: 1
          maximum: 10000
    ChunkingConfig:
      description: How a source is cut into chunks.
      type: object
      properties:
        strategy:
          description: >-
            Which structure the splitter cuts on — markdown headings, fixed-size
            windows, HTML elements, CSV rows, or code syntax. Pick the one that
            matches the corpus.
          default: markdown_heading
          x-enum:
            - markdown_heading
            - sliding_window
            - html
            - csv
            - code
          type: string
        target_size:
          description: >-
            Chunk size the splitter aims for, in tokens. Smaller chunks retrieve
            more precisely; larger ones carry more surrounding context.
          default: 512
          type: integer
          minimum: 64
          maximum: 4096
        overlap:
          description: >-
            Tokens each chunk repeats from its predecessor, so a passage split
            across a boundary is still retrievable whole.
          default: 64
          type: integer
          minimum: 0
          maximum: 1024
        respect_sections:
          description: >-
            Never cut across a section boundary, even when that leaves a chunk
            short of `target_size`.
          default: true
          type: boolean
    ArtifactType:
      description: >-
        One kind of artifact to extract. `name` is required of a written
        manifest; a read echoes a stored document that lacks one rather than
        failing.
      type: object
      properties:
        name:
          description: >-
            What the type is called. Edge endpoints reference it, and a sqlite
            type's table is named after it.
          type: string
          maxLength: 64
        kind:
          description: >-
            What the artifact represents, which selects the extraction prompt.
            `glossary` is the exception — it reads the headings named in
            `sections` deterministically, with no LLM call.
          default: topic
          x-enum:
            - summary
            - topic
            - entity
            - event
            - doc
            - page
            - glossary
          type: string
        scope:
          description: >-
            How widely the extraction reaches. `document` extracts one artifact
            per source; `corpus` reduces mentions from across every source into
            one artifact per subject.
          default: corpus
          x-enum:
            - document
            - corpus
          type: string
        icon:
          description: Symbol to display beside artifacts of this kind.
          type: string
          maxLength: 64
        description:
          description: >-
            What this type should capture. Goes into the extraction prompt, so
            it steers the result.
          type: string
          maxLength: 512
        coverage:
          description: >-
            Topics the extraction is told to address wherever the source speaks
            to them.
          type: array
          items:
            description: One topic the extraction should address.
            type: string
            maxLength: 128
          maxItems: 32
        sections:
          description: >-
            Exact section headings a `glossary`-kind type reads verbatim.
            Ignored by every other kind.
          type: array
          items:
            description: One exact section heading to read.
            type: string
            maxLength: 128
          maxItems: 64
        min_doc_count:
          description: Overrides the manifest-level `min_doc_count` for this type.
          default: 1
          type: integer
          minimum: 1
          maximum: 64
        format:
          description: >-
            Where the artifacts of this type are written — `markdown` a prose
            file each, `sqlite` rows in the context's structured database.
          default: markdown
          x-enum:
            - markdown
            - sqlite
          type: string
        columns:
          description: >-
            Table schema for a `sqlite`-format type. Ignored for `markdown`. Two
            names that normalize to the same column collide, and the first
            declaration wins.
          type: array
          items:
            description: One column of the type's table.
            type: object
            properties:
              name:
                description: Column name.
                type: string
                maxLength: 64
              type:
                description: SQLite column affinity.
                default: TEXT
                x-enum:
                  - TEXT
                  - INTEGER
                  - REAL
                  - NUMERIC
                type: string
              description:
                description: What the column holds. Steers the extraction that fills it.
                type: string
                maxLength: 256
            required:
              - name
          maxItems: 64
        natural_key:
          description: >-
            Columns that identify a row uniquely, so re-curating a source
            upserts its rows rather than duplicating them. `sqlite`-format types
            only.
          type: array
          items:
            description: One column of the upsert key.
            type: string
            maxLength: 64
          maxItems: 16
      required:
        - name
    EdgeType:
      description: >-
        One typed, directed relationship between artifact types. `name`, `from`,
        and `to` are required of a written manifest; a read echoes a stored
        document that lacks one rather than failing.
      type: object
      properties:
        name:
          description: What the relationship is called, e.g. `mentions`.
          type: string
          maxLength: 64
        from:
          description: >-
            Source artifact-type name. May equal `to` for a self-referential
            edge.
          type: string
          maxLength: 64
        to:
          description: Target artifact-type name
          type: string
          maxLength: 64
        description:
          description: What the relationship means. Steers the extraction that finds it.
          type: string
          maxLength: 512
        attributes:
          description: Extra properties recorded on each edge, e.g. `count`.
          type: array
          items:
            description: One attribute name.
            type: string
            maxLength: 64
          maxItems: 16
      required:
        - name
        - from
        - to
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Session token from `POST /auth/login`, sent as `Authorization: Bearer
        <token>`.
    apiKey:
      type: apiKey
      in: header
      name: Api-Key
      description: Pinecone API key, accepted as an alternative to the bearer token.

````