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

# Update your mesh settings

> Changes the mesh settings of your primary organization; same fields as Update organization mesh settings, without `org_id`.

Requires a signed-in user token (`Authorization: Bearer cliq_tok_…`). Results are limited to what that user can see.



## OpenAPI

````yaml /openapi/hub-by-tag/hub-mesh.yaml post /v1/account/mesh/update
openapi: 3.0.3
info:
  title: 'CliqHub API: Mesh'
  version: 1.0.0
  description: >-
    The agent mesh: a provider that lets your realms' agents be found and called
    by other

    agents (A2A). An organization picks a provider and its settings; realms
    inherit it unless

    they override it (Realms, Manage A2A for a realm). Organization admins
    manage these.
servers:
  - url: https://{host}
    variables:
      host:
        default: cliqhub.io
        description: CliqHub host
security: []
tags:
  - name: Mesh
    description: >-
      The agent mesh: a provider that lets your realms' agents be found and
      called by other

      agents (A2A). An organization picks a provider and its settings; realms
      inherit it unless

      they override it (Realms, Manage A2A for a realm). Organization admins
      manage these.
paths:
  /v1/account/mesh/update:
    post:
      tags:
        - Mesh
      summary: Update your mesh settings
      description: >-
        Changes the mesh settings of your primary organization; same fields as
        Update organization mesh settings, without `org_id`.


        Requires a signed-in user token (`Authorization: Bearer cliq_tok_…`).
        Results are limited to what that user can see.
      operationId: POST_v1_account_mesh_update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                active_provider_id:
                  type: string
                  nullable: true
                  description: The provider to use, or `null` for none.
                auto_enable_a2a_on_realm_create:
                  type: boolean
                  description: Turn A2A on for new realms.
                provider_id:
                  type: string
                  description: A provider whose settings to change.
                provider_settings:
                  type: object
                  additionalProperties: true
                  description: Settings for `provider_id`.
            examples:
              default:
                value:
                  auto_enable_a2a_on_realm_create: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgMeshSettings'
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                    description: Always `true` on success.
                required:
                  - ok
              example:
                ok: true
                org_id: 2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f
                org_slug: acme
                active_provider_id: null
                providers: {}
                auto_enable_a2a_on_realm_create: false
                adapters: []
        '401':
          description: >-
            `unauthorized`: No `Authorization` header, or the token is
            malformed, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    ok: false
                    error:
                      code: unauthorized
                      message: Authentication required
        '403':
          description: |-
            `forbidden`: A daemon token was used; this route needs a user token.

            `forbidden`: You are not an admin of the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    ok: false
                    error:
                      code: forbidden
                      message: You do not have access to do this
                forbidden (endpoint):
                  summary: forbidden (endpoint)
                  value:
                    ok: false
                    error: Org admin role required
                    code: forbidden
        '422':
          description: >-
            `invalid_params`: The body fails the request schema: a field is
            missing or has the wrong type. `details.issues` lists each problem.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: Required
                    code: invalid_params
                    details:
                      issues:
                        - field: org_id
                          message: Required
        '500':
          description: >-
            `internal_error`: An unexpected server fault. Retry later; if it
            persists, report it with the time of the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                internal_error:
                  summary: internal_error
                  value:
                    ok: false
                    error: Internal server error
                    code: internal_error
      security:
        - BearerAuth: []
components:
  schemas:
    OrgMeshSettings:
      type: object
      properties:
        org_id:
          type: string
        org_slug:
          type: string
        active_provider_id:
          type: string
          nullable: true
        providers:
          type: object
          additionalProperties: true
          description: Each provider's settings, secrets masked.
        auto_enable_a2a_on_realm_create:
          type: boolean
          description: New realms get A2A turned on.
        adapters:
          type: array
          items:
            $ref: '#/components/schemas/MeshAdapter'
    HubErr:
      type: object
      required:
        - ok
        - error
      description: >-
        Every failure. Route-policy denials (401/403/404, and 400 when neither
        realm_id nor org_id was sent) answer `error` as `{ code, message }`;
        errors raised by the endpoint answer `error` as the message with the
        code beside it in `code`. Every error has a code. See
        [Errors](/hub-api/errors).
      properties:
        ok:
          type: boolean
          description: Always false on error
        error:
          description: The message, or `{ code, message }` for an access denial.
          oneOf:
            - type: string
            - type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
        code:
          type: string
          description: Stable error code of an endpoint error.
        details:
          type: object
          additionalProperties: true
          description: Structured detail, when there is some.
    MeshAdapter:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        settings_schema:
          type: object
          additionalProperties: true
          description: The settings the provider needs.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cliq_tok_* | cliq_dt_*
      description: >-
        User PAT (`cliq_tok_…`, including session-scoped) or realm token
        (`cliq_dt_…`).

````

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