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

# UpdateKnowledgeAPI mirrors the canonical typed Knowledge action. The action


> request stays unchanged so revisions, protected fields, and write validation remain centralized in the Knowledge service.




## OpenAPI

````yaml /api/openapi.json post /v1/knowledge/{knowledgeObjectID}/actions
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-10-22'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/knowledge/{knowledgeObjectID}/actions:
    post:
      summary: >
        UpdateKnowledgeAPI mirrors the canonical typed Knowledge action. The
        action
      description: >
        request stays unchanged so revisions, protected fields, and write
        validation remain centralized in the Knowledge service.
      operationId: POST:mcp.UpdateKnowledgeAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: knowledgeObjectID
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                access:
                  description: |
                    (workspace | public). Ignored by other actions.
                  title: >
                    Access is the target access level for the set_visibility
                    action
                  type: string
                action:
                  type: string
                agent:
                  title: |
                    Agent identifies the named runtime making the write.
                  type: string
                body_markdown:
                  type: string
                config_json:
                  type: object
                expected_updated_at:
                  description: >
                    a previous read. A mismatch returns a conflict without
                    changing the object. Omit it to retain the existing
                    unconditional action semantics.
                  format: date-time
                  title: >
                    ExpectedUpdatedAt makes the action conditional on the
                    version returned by
                  type: string
                status:
                  description: |
                    (draft | approved | archived). Ignored by other actions.
                  title: |
                    Status is the target status for the set_status action
                  type: string
                title:
                  type: string
              type: object
              required:
                - action
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  attachments:
                    items:
                      $ref: '#/components/schemas/knowledge.KnowledgeAttachment'
                    type: array
                  attachments_incomplete:
                    description: >
                      resolved on this read — the public-grant lookup failed, or
                      an attachment could not be signed — and Attachments
                      therefore under-reports (Public false, SignedURL empty)
                      rather than failing the read. A caller that would PERSIST
                      a conclusion drawn from attachment state (the
                      sending-theme derivation, which stores "no public logo" as
                      final) must treat this read as transient and try again
                      later.
                    title: >
                      AttachmentsIncomplete is true when some attachment state
                      could not be
                    type: boolean
                  backlinks:
                    items:
                      $ref: '#/components/schemas/knowledge.KnowledgeLink'
                    type: array
                  data_bindings:
                    items:
                      $ref: '#/components/schemas/knowledge.KnowledgeDataBinding'
                    type: array
                  declared_context_status:
                    $ref: '#/components/schemas/knowledge.DeclaredContextStatus'
                  links:
                    items:
                      $ref: '#/components/schemas/knowledge.KnowledgeLink'
                    type: array
                  object:
                    $ref: '#/components/schemas/knowledge.KnowledgeObject'
                  performance_indicators:
                    items:
                      $ref: >-
                        #/components/schemas/knowledge.KnowledgePerformanceIndicator
                    type: array
                  related_objects:
                    items:
                      $ref: '#/components/schemas/knowledge.RelatedKnowledgeObject'
                    type: array
                  resolved_body_markdown:
                    description: >
                      resolved to their live values — non-nil only when the body
                      contains references. Object.BodyMarkdown stays the raw,
                      editable template; this is the read-time view. Render this
                      for viewing/agent-context; edit the raw. A non-nil pointer
                      to "" means references were present but all resolved to
                      empty strings; nil means no references (fast path, no
                      resolution attempted).
                    title: >
                      ResolvedBodyMarkdown is the body with {{slug.key}}
                      collection references
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    knowledge.KnowledgeAttachment:
      properties:
        byte_size:
          format: int64
          type: integer
        content_text:
          type: string
        created_at:
          format: date-time
          type: string
        description:
          type: string
        filename:
          type: string
        id:
          format: uuid
          type: string
        kind:
          type: string
        knowledge_object_id:
          format: uuid
          type: string
        media_type:
          type: string
        metadata_json:
          type: object
        public:
          description: >
            it is servable to anonymous visitors via
            /public/knowledge-assets/:id. It drives the per-attachment
            visibility control in the UI. Independent of the parent object's and
            any page's scope (a private brand library's image can be public);
            set deliberately via SetKnowledgeAttachmentVisibility or by
            publishing a page that embeds it.
          title: >
            Public reports whether this attachment carries its own public grant
            — i.e.
          type: boolean
        signed_url:
          type: string
      type: object
    knowledge.KnowledgeLink:
      properties:
        description:
          type: string
        id:
          format: uuid
          type: string
        link_text:
          type: string
        normalized_target:
          type: string
        relationship_type:
          type: string
        source_field:
          type: string
        source_object_id:
          format: uuid
          type: string
        status:
          type: string
        target_object_id:
          format: uuid
          type: string
        target_resource_id:
          type: string
        target_resource_type:
          type: string
      type: object
    knowledge.KnowledgeDataBinding:
      properties:
        binding_type:
          type: string
        column_metadata:
          type: object
        dataset_id:
          type: string
        entity_keys:
          items:
            $ref: '#/components/schemas/knowledge.KnowledgeDataBindingEntityKey'
          type: array
        fields:
          items:
            $ref: '#/components/schemas/knowledge.KnowledgeDataBindingField'
          type: array
        grain:
          items:
            type: string
          type: array
        id:
          type: string
        notes:
          type: string
        primary_key:
          items:
            type: string
          type: array
        provenance:
          $ref: '#/components/schemas/knowledge.KnowledgeDataBindingProvenance'
        query_constraints:
          items:
            $ref: '#/components/schemas/knowledge.KnowledgeDataBindingConstraint'
          type: array
        resource_id:
          type: string
        resource_type:
          type: string
      type: object
    knowledge.DeclaredContextStatus:
      description: |
        can be resolved and viewed. Unknown conveys no target identity or type.
      title: >
        DeclaredContextStatus describes whether every outgoing Knowledge
        declaration
      type: string
    knowledge.KnowledgeObject:
      properties:
        body_markdown:
          type: string
        config_json:
          type: object
        content_state:
          description: >
            declaration onto every read shape — "provisional" when the body is a
            stub the producer intends to complete in a later write, empty when
            nothing was declared (which means complete). It is lifted out of
            config\_json deliberately: a provisional object stays discoverable
            everywhere, so every consumer that lists or searches has to be able
            to tell one apart without learning that the knowledge service keeps
            the declaration in config JSON. See
            KnowledgeContentStateProvisional.
          title: |
            ContentState carries the producer's config_json.content_state
          type: string
        created_at:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        organization_id:
          format: uuid
          type: string
        provenance_json:
          type: object
        scope_json:
          type: object
        slug:
          type: string
        source_id:
          type: string
        source_type:
          type: string
        source_updated_at:
          format: date-time
          type: string
        status:
          type: string
        title:
          type: string
        type:
          type: string
        updated_at:
          format: date-time
          type: string
      type: object
    knowledge.KnowledgePerformanceIndicator:
      properties:
        object:
          $ref: '#/components/schemas/knowledge.KnowledgeObject'
        relation:
          $ref: '#/components/schemas/knowledge.KnowledgeObjectRelation'
        value_status:
          type: string
      type: object
    knowledge.RelatedKnowledgeObject:
      properties:
        object:
          $ref: '#/components/schemas/knowledge.KnowledgeObject'
        relation:
          $ref: '#/components/schemas/knowledge.KnowledgeObjectRelation'
      type: object
    knowledge.KnowledgeDataBindingEntityKey:
      properties:
        entity_type:
          type: string
        field:
          type: string
        references:
          type: string
      type: object
    knowledge.KnowledgeDataBindingField:
      properties:
        aggregation:
          type: string
        description:
          type: string
        grain:
          type: string
        name:
          type: string
        role:
          type: string
        semantic_name:
          type: string
        sql:
          type: string
        type:
          type: string
      type: object
    knowledge.KnowledgeDataBindingProvenance:
      properties:
        batch_id:
          type: string
        confidence:
          type: string
        source_id:
          type: string
        source_object_id:
          type: string
        source_type:
          type: string
      type: object
    knowledge.KnowledgeDataBindingConstraint:
      properties:
        column:
          type: string
        operator:
          type: string
        value:
          type: string
      type: object
    knowledge.KnowledgeObjectRelation:
      properties:
        description:
          type: string
        direction:
          type: string
        link_text:
          type: string
        relationship_type:
          type: string
        source_field:
          type: string
        status:
          type: string
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.