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

# Update the knowledge base

> Changes the knowledge base, the business context and the workspace profile. Send only the
fields you want to change. Fields you leave out keep their values.

**`knowledgeBase` is replaced whole.** When you send it, the stored knowledge base becomes
exactly what you sent: a fixed text or an entry you leave out is removed. To change one text
or add one entry, call **Get the knowledge base**, change what you need, and send the whole
object back.

- An empty string clears a text.
- Top-level fields this page does not list are ignored without an error.
- Keys inside `knowledgeBase` and its entries that are not listed here are stored as you send them.
- Entry labels are not checked for duplicates. Keep them unique so people and workers can tell them apart.

Workers read the new knowledge base on their next run. Only workspace owners and admins can
call this. API keys act as an admin, so every key can.

> [!WARNING]
>
> Sending `knowledgeBase` replaces it whole. Leaving out a text or an entry deletes it, and
> it cannot be recovered. Read the knowledge base first and send every text and entry you
> want to keep.

> [!NOTE]
>
> In the Heliyos MCP server: [`heliyos_knowledge_entries_delete`](https://docs.heliyos.ai/mcp/tools/knowledge-base-and-files#heliyos-knowledge-entries-delete), [`heliyos_knowledge_entries_set`](https://docs.heliyos.ai/mcp/tools/knowledge-base-and-files#heliyos-knowledge-entries-set), [`heliyos_knowledge_get`](https://docs.heliyos.ai/mcp/tools/knowledge-base-and-files#heliyos-knowledge-get), [`heliyos_knowledge_update`](https://docs.heliyos.ai/mcp/tools/knowledge-base-and-files#heliyos-knowledge-update).


## OpenAPI

````yaml /api-reference/openapi.json patch /v1/auth/organizations/current
openapi: 3.0.3
info:
  title: Heliyos API
  version: 1.0.0
  description: >-
    The REST API for Heliyos, the AI operating system for revenue. Every request
    is scoped to the workspace that owns the API key. Responses are JSON in a `{
    meta, data }` envelope; errors use `{ message, error: { code, message,
    details } }`.
  contact:
    name: Heliyos support
    email: soham@heliyos.ai
    url: https://www.heliyos.ai
servers:
  - url: https://api-prod.heliyos.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspace
    description: >-
      The workspace your API key belongs to, and the log of credits it has used.
      Every other call in this API is scoped to this workspace.
  - name: Schemas
    description: >-
      Objects are your record types: companies, people, deal pipelines and any
      custom objects you add. Each object has fields, and a field's type decides
      what its records can hold.
  - name: Records
    description: >-
      Records are the rows of an object (base schema): companies, people, deals
      and custom objects. A record holds field values keyed by the object's
      field keys and links to other records.
  - name: Timeline
    description: >-
      The AI-written timeline of a company, person or deal: summary entries
      Heliyos writes on a schedule. For the exact change history see Activities,
      and for emails and meetings see Interactions.
  - name: Activities
    description: >-
      The change history of records and tasks: who created, changed or deleted
      what, and when. People, workers and the system each appear as the actor on
      the changes they make.
  - name: Interactions
    description: >-
      Email threads and meetings synced from connected mailboxes and calendars,
      linked to the people and companies they involve.
  - name: Notes
    description: >-
      Free-text notes, optionally linked to records, tasks and interactions.
      Notes show up on the timeline of every record they are linked to, and
      workers read them as customer memory.
  - name: Tasks
    description: >-
      Work items for people and workers, optionally linked to records. A task
      can be assigned to people, to workers, or both, and workers can be started
      on it directly.
  - name: Workers and runs
    description: >-
      Workers are the AI teammates of your workspace (the API calls them
      agents). Define what each one does and what starts it, ask Heliyos to do
      work, and follow every run, its steps and the reviews it waits on.
  - name: Reviews
    description: >-
      Reviews keep the team in control of consequential work. When a worker
      wants to send an email, change a deal, book a meeting, act in a connected
      app or needs a person's answer, the action waits as a review until someone
      approves or rejects it.
  - name: Scouts
    description: >-
      Scouts watch companies and the web for events such as funding rounds,
      product launches, leadership changes or press coverage, and record each
      finding as a signal. A workspace Scout defines what to look for; company
      Scouts are its copies running on individual companies.
  - name: Signals
    description: >-
      Signals are what Scouts find: one event, such as a funding round or a new
      executive, with a summary, its sources and the company it is about. New
      signals are unread until you mark them read.
  - name: Watchlist
    description: >-
      The watchlist is the set of companies your workers monitor. Each watched
      company uses one Watcher from your plan: the workers keep it enriched,
      pull in its emails and meetings, and run Scouts on it.
  - name: Knowledge base
    description: >-
      What your workers know about the business: the business context, four
      fixed texts (products, pain points, value proposition, qualification
      criteria) and any custom entries your team adds. Workers read it on their
      next run. Files your workers read live under Files, with kind
      `knowledge_base`.
  - name: Files
    description: >-
      Knowledge base files that workers read, and files attached to records,
      tasks and other resources. The API calls them attachments. Uploading takes
      three calls: get an upload URL, send the bytes to it, then create the
      file.
  - name: Labels
    description: >-
      Label groups that sort your email threads, for example Intent or Pricing
      questions. Heliyos files each classified thread under a group, and each
      group holds the more specific labels it brings together. The API calls
      them classification labels.
  - name: Team
    description: >-
      The people in your workspace and their roles: joined members and pending
      invitations. Inviting someone sends them an email.
  - name: Notification settings
    description: >-
      Which workspace events send notification emails, how often, and to whom.
      There is one settings document per workspace, shared by everyone in it.
paths:
  /v1/auth/organizations/current:
    patch:
      tags:
        - Knowledge base
      summary: Update the knowledge base
      description: >-
        Changes the knowledge base, the business context and the workspace
        profile. Send only the

        fields you want to change. Fields you leave out keep their values.


        **`knowledgeBase` is replaced whole.** When you send it, the stored
        knowledge base becomes

        exactly what you sent: a fixed text or an entry you leave out is
        removed. To change one text

        or add one entry, call **Get the knowledge base**, change what you need,
        and send the whole

        object back.


        - An empty string clears a text.

        - Top-level fields this page does not list are ignored without an error.

        - Keys inside `knowledgeBase` and its entries that are not listed here
        are stored as you send them.

        - Entry labels are not checked for duplicates. Keep them unique so
        people and workers can tell them apart.


        Workers read the new knowledge base on their next run. Only workspace
        owners and admins can

        call this. API keys act as an admin, so every key can.
      operationId: updateCurrentOrganization
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                businessContext:
                  type: string
                  description: >-
                    What the business does, in your team's words. Plain text or
                    Markdown. An empty string clears it.
                knowledgeBase:
                  type: object
                  properties:
                    productsInformation:
                      type: string
                      description: The products and services you sell.
                    painPoints:
                      type: string
                      description: The customer problems your products solve.
                    valueProposition:
                      type: string
                      description: Why customers choose your products.
                    qualificationCriteria:
                      type: string
                      description: What makes a lead worth pursuing.
                    entries:
                      type: array
                      description: >-
                        Every custom entry you want to keep, in display order.
                        Send `[]` to remove them all.
                      items:
                        type: object
                        properties:
                          label:
                            type: string
                            description: The entry's title, for example `Pricing`.
                          content:
                            type: string
                            description: The entry's content, as plain text or HTML.
                  description: >-
                    The whole knowledge base. Replaces the stored one. Each text
                    is plain text, Markdown or HTML, and an empty string clears
                    it.
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: The workspace's name, 1 to 200 characters after trimming.
                website:
                  type: string
                  format: uri
                  description: >-
                    The company website, an `http` or `https` URL. An empty
                    string clears it.
                industry:
                  type: string
                  description: The industry, as free text. An empty string clears it.
                timezone:
                  type: string
                  description: >-
                    The workspace's time zone, as an IANA name such as
                    `America/New_York`. Not checked against a list. An empty
                    string clears it.
                address:
                  type: string
                  description: Street address. An empty string clears it.
                city:
                  type: string
                  description: City. An empty string clears it.
                state:
                  type: string
                  description: State or region. An empty string clears it.
                zipcode:
                  type: string
                  description: Postal code. An empty string clears it.
                country:
                  type: string
                  description: Country. An empty string clears it.
                logo:
                  type: string
                  description: >-
                    The logo: the id of a file uploaded with **Upload a file**,
                    or the https URL Heliyos returned for it. Other URLs are
                    refused. An empty string clears it.
              additionalProperties: false
            examples:
              knowledgeBase:
                summary: Add a knowledge entry
                value:
                  knowledgeBase:
                    productsInformation: >-
                      Wholesale catalogue of 1,200 specialty foods, with
                      next-day delivery in 40 metro areas.
                    painPoints: >-
                      Independent grocers lose margin to stockouts and juggle
                      too many small suppliers.
                    valueProposition: >-
                      One supplier, one invoice and next-day restocking for the
                      long tail of the shelf.
                    qualificationCriteria: >-
                      Independent grocers or cafe groups with 3 or more
                      locations and a buyer we can reach.
                    entries:
                      - label: Pricing
                        content: >-
                          Volume pricing starts at $5,000 a month. Net 30 terms
                          after the first order.
                      - label: Competitors
                        content: >-
                          Regional distributors and direct-from-brand programs.
                          We win on breadth and delivery speed.
                      - label: Delivery areas
                        content: >-
                          Next-day delivery in 40 metro areas across the US and
                          Canada. Two-day delivery elsewhere.
              businessContext:
                summary: Change the business context only
                value:
                  businessContext: >-
                    Northwind Traders supplies specialty food and beverage
                    products to independent grocers and cafes across North
                    America.
      responses:
        '200':
          description: >-
            The changes were saved. `data` is an empty object. Call **Get the
            knowledge base** to read the result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - meta
                  - data
                properties:
                  meta:
                    type: object
                    required:
                      - message
                    properties:
                      message:
                        type: string
                        description: A human-readable summary of the result.
                  data:
                    type: object
                    description: Empty object.
              example:
                meta:
                  message: Organization details successfully updated.
                data: {}
        '400':
          description: >-
            VALIDATION_FAILED: a field has the wrong type, `name` is empty or
            longer than 200 characters, `website` is not an http or https URL,
            or `logo` is not a Heliyos file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: >-
            FORBIDDEN_ACTION: the caller is not an owner or admin of the
            workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - message
        - error
      properties:
        message:
          type: string
          description: Same as error.message.
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - UNAUTHENTICATED
                - FORBIDDEN_ACTION
                - NOT_FOUND
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL
            message:
              type: string
            details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace API key, sent as `Authorization: Bearer heliyos_...`. Create
        one in Heliyos under Settings → API keys. A key acts as a workspace
        admin in the one workspace it was created in.

````

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