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

# SetConnectionScopeAPI mirrors the erdo_set_connection_scope MCP tool.




## OpenAPI

````yaml /api/openapi.json post /v1/integrations/{integrationID}/connection-scope
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, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-08-07'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/integrations/{integrationID}/connection-scope:
    post:
      summary: |
        SetConnectionScopeAPI mirrors the erdo_set_connection_scope MCP tool.
      operationId: POST:mcp.SetConnectionScopeAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: integrationID
          required: true
          schema:
            format: uuid
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                account_id:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  description:
                    description: >
                      connection manages." Empty when this integration does not
                      scope a connection to an account, in which case Options
                      and Selected are empty too.
                    title: >
                      Description explains the choice, e.g. "Choose the Google
                      Ads account this
                    type: string
                  has_connection_scope:
                    description: >
                      account per connection at all. False for a database or a
                      Pipedream app, where there is nothing to choose.
                    title: >
                      HasConnectionScope reports whether this integration
                      chooses a provider
                    type: boolean
                  integration_id:
                    type: string
                  options:
                    items:
                      $ref: '#/components/schemas/mcp.ConnectionAccountOption'
                    title: |
                      Options lists the accounts available to this connection.
                    type: array
                  required:
                    description: >
                      is chosen. It describes a consequence, not a gate:
                      connecting without choosing is allowed and expected,
                      because an account may not exist yet when the connection
                      is made.
                    title: >
                      Required reports that the connection cannot resolve an
                      account until one
                    type: boolean
                  selected:
                    description: |
                      has been chosen.
                    items:
                      $ref: '#/components/schemas/mcp.ConnectionAccountOption'
                    title: >
                      Selected is the account the connection currently operates,
                      empty when none
                    type: array
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.ConnectionAccountOption:
      properties:
        id:
          title: |
            ID is the provider's account id.
          type: string
        name:
          title: |
            Name is the account's display name at the provider.
          type: string
        parent:
          description: |
            Reddit business, a Meta Business Manager). Empty otherwise.
          title: >
            Parent names the account's owner where reaching it goes through one
            (a
          type: string
        type:
          description: |
            "ad\_account", "advertiser", "property").
          title: |
            Type names the level this account sits at (e.g. "account",
          type: string
      title: |
        ConnectionAccountOption is one account a connection could operate.
      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_...).

````