> ## 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.

# SetIntegrationManagedAccessAPI starts or stops providing a connection to the


> organizations this one manages — an agency's own vendor key, spendable by every client it operates for as long as the management link is live, instead of the same key connected by hand once per client and re-fanned out on every rotation.

Only a key-authenticated connection qualifies, and the caller must both hold admin on the connection and be an admin or owner of the organization that holds it; the integration service enforces both and this handler stays thin.

There is deliberately no MCP tool behind this endpoint. Widening the set of organizations a credential serves is not a decision a model should be able to take on its own — the same reasoning that keeps manager-key minting off the model-facing surface — so it is reachable from the app, the CLI and here.




## OpenAPI

````yaml /api/openapi.json post /v1/integrations/{integrationID}/managed-access
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-09-09'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/integrations/{integrationID}/managed-access:
    post:
      summary: >
        SetIntegrationManagedAccessAPI starts or stops providing a connection to
        the
      description: >
        organizations this one manages — an agency's own vendor key, spendable
        by every client it operates for as long as the management link is live,
        instead of the same key connected by hand once per client and re-fanned
        out on every rotation.


        Only a key-authenticated connection qualifies, and the caller must both
        hold admin on the connection and be an admin or owner of the
        organization that holds it; the integration service enforces both and
        this handler stays thin.


        There is deliberately no MCP tool behind this endpoint. Widening the set
        of organizations a credential serves is not a decision a model should be
        able to take on its own — the same reasoning that keeps manager-key
        minting off the model-facing surface — so it is reachable from the app,
        the CLI and here.
      operationId: POST:mcp.SetIntegrationManagedAccessAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: integrationID
          required: true
          schema:
            format: uuid
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                managed_access:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  managed_access:
                    type: string
                  managed_organizations:
                    description: >
                      manages nobody yet. The second case is a truthful answer
                      rather than a refusal — being a manager IS holding live
                      links, so an org with none has simply not adopted a
                      client, and the fix is to link one rather than to ask for
                      a permission.
                    items:
                      $ref: >-
                        #/components/schemas/integration.ManagedOrganizationSummary
                    title: >
                      ManagedOrganizations is empty for owner_only, and also for
                      an org that
                    type: array
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    integration.ManagedOrganizationSummary:
      properties:
        name:
          type: string
        slug:
          type: string
      title: >
        ManagedOrganizationSummary names one org a provided connection now
        serves.
      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_...).

````