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

# Set the account's organisation profile

> **Account admins only** — this text lands in *every* member's system prompt, plus the judge and verify prompts.

The body is the profile object itself — fields at the top level, never wrapped in a `profile` key. Sending a body whose fields are all empty drops the layer: the handler then stores an absent `profile` key rather than `{}`, so a fresh account is not permanently blocked from its default seed. Every field is optional; empty list entries are dropped rather than stored. Each field has its own rune cap (see the schema), and the whole document is additionally capped at **8000 characters** summed across every field. Any cap is enforced at the write and refused by name — never silently truncated.

The write is a read-modify-write over the whole stored document, because agent-service owns the other keys on this subject (`voice`, `expert_count`, `max_retries`, the per-stage model choices). A failed read is therefore a 502, never a write.

A failed role lookup is 502. Subject: `microstrate.hub.put.coworker-profile`.



## OpenAPI

````yaml /api-reference/endpoint/abbie/openapi.json put /hub/coworker/profile
openapi: 3.1.0
info:
  title: Abbie API (beta)
  version: 1.0.0
  description: >
    **Beta.** This API is in beta: operations and fields may change without a
    deprecation period. Do not depend on undocumented fields. It covers the
    subset of Abbie's API used by the Quiva coworker MCP server: skills, todos,
    memory, profile, corrections, environment and models.


    HTTP surface of hub-service for Abbie/Coworker configuration, agent rapport
    & context, chat-session sharing, and MCP registration.


    ## Transport and response envelope


    Every operation here is a gateway mapping onto a Bellerophon/kraken subject
    of the form `microstrate.hub.<method>.<endpoint-slug>` (see
    `hub-service/service/service.go` and `docs/abbie-gateway-mappings.md`).
    Handlers reply on the mesh with an envelope `{"status_code": <int>, "body":
    <object>}`; the gateway unwraps it, so `status_code` becomes the HTTP status
    and `body` becomes the HTTP response body. **The schemas below describe the
    unwrapped `body`.**


    Errors are always `{"error": "<message>"}` with the matching HTTP status.


    ## Parameter conventions


    The gateway forwards URL parameters to the handler as request headers:


    - `x-param-query-<name>` — a query-string parameter (`?name=value`)

    - `x-param-<name>` — a path parameter


    Every parameter documented as `in: query` or `in: path` below corresponds to
    one of those headers, and the header suffix is named in each parameter's
    description where it is not obvious.


    ## Authentication


    All operations require the caller's bearer token; the account id, user id
    and user public key are always taken from the JWT and never from the URL or
    body. Endpoints that additionally require an account **admin** role are
    marked in their description — a failed role lookup answers **502**, never
    403 and never a pass.


    ## Two path notes


    - `PATCH /hub/agent-session-visibility/{session_id}` — the handler reads the
    path parameter as `x-param-session_id`, matching its sibling `PATCH
    /hub/agent-session/{session_id}`.

    - `GET|POST|PUT /hub/agent/user-context/{id}` — the handler requires the
    **agent id** as `x-param-id`; the frontend calls
    `/hub/agent/user-context/<agentId>`.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Skills
  - name: Todos
  - name: Memory
  - name: Profile and personality
  - name: Corrections
  - name: Environment
  - name: Models
paths:
  /hub/coworker/profile:
    put:
      tags:
        - Profile and personality
      summary: Set the account's organisation profile
      description: >-
        **Account admins only** — this text lands in *every* member's system
        prompt, plus the judge and verify prompts.


        The body is the profile object itself — fields at the top level, never
        wrapped in a `profile` key. Sending a body whose fields are all empty
        drops the layer: the handler then stores an absent `profile` key rather
        than `{}`, so a fresh account is not permanently blocked from its
        default seed. Every field is optional; empty list entries are dropped
        rather than stored. Each field has its own rune cap (see the schema),
        and the whole document is additionally capped at **8000 characters**
        summed across every field. Any cap is enforced at the write and refused
        by name — never silently truncated.


        The write is a read-modify-write over the whole stored document, because
        agent-service owns the other keys on this subject (`voice`,
        `expert_count`, `max_retries`, the per-stage model choices). A failed
        read is therefore a 502, never a write.


        A failed role lookup is 502. Subject:
        `microstrate.hub.put.coworker-profile`.
      operationId: putCoworkerProfile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CoworkerProfile'
      responses:
        '200':
          description: The organisation profile as stored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoworkerProfileResponse'
        '400':
          description: >-
            A field or the whole document over its cap, or the write could not
            be published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/AdminOnly'
        '502':
          description: The stored document could not be read, or the role lookup failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CoworkerProfile:
      type: object
      description: >-
        The FROZEN wire shape (docs/abbie-org-profile-and-env-request-plan.md
        §B-1a). Every field is optional; absent, `""` and `[]` all mean nothing
        to render — there is no null. Caps are counted in runes and enforced at
        the write; the whole object is additionally capped at 8000 runes summed
        across every field.
      properties:
        legal_name:
          type: string
          maxLength: 500
        trading_names:
          type: array
          items:
            type: string
            maxLength: 200
          maxItems: 10
        what_we_do:
          type: string
          maxLength: 1000
        industry:
          type: string
          maxLength: 200
        regulator:
          type: string
          maxLength: 500
          description: Regulator and/or licence reference
        size:
          type: string
          maxLength: 200
        locations:
          type: string
          maxLength: 500
        financial_year_end:
          type: string
          maxLength: 100
        systems_of_record:
          type: array
          items:
            $ref: '#/components/schemas/CoworkerProfileSystemOfRecord'
          maxItems: 20
        glossary:
          type: array
          items:
            $ref: '#/components/schemas/CoworkerProfileGlossaryEntry'
          maxItems: 40
        working_hours:
          type: string
          maxLength: 300
        timezone:
          type: string
          maxLength: 100
        house_style:
          type: string
          maxLength: 1000
        always:
          type: array
          items:
            type: string
            maxLength: 300
          maxItems: 20
        never:
          type: array
          items:
            type: string
            maxLength: 300
          maxItems: 20
        data_handling:
          type: string
          maxLength: 1000
    CoworkerProfileResponse:
      allOf:
        - $ref: '#/components/schemas/CoworkerProfile'
        - type: object
          properties:
            is_default:
              type: boolean
              description: >-
                True when every field is empty, so the profile block renders
                nothing at all
    Error:
      type: object
      description: The unwrapped error body. The HTTP status carries the code.
      properties:
        error:
          type: string
      required:
        - error
    CoworkerProfileSystemOfRecord:
      type: object
      properties:
        system:
          type: string
          maxLength: 200
          example: NetSuite
        authoritative_for:
          type: string
          maxLength: 300
          example: Supplier and contract data
    CoworkerProfileGlossaryEntry:
      type: object
      properties:
        term:
          type: string
          maxLength: 100
          example: MSA
        meaning:
          type: string
          maxLength: 300
          example: >-
            Master services agreement — the umbrella terms a vendor signs before
            any work order
  responses:
    Unauthorized:
      description: No account (or user) identity in the auth context
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AdminOnly:
      description: An account admin role is required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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