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

# ConnectIntegrationAPI mirrors erdo_connect_integration, including remote MCP


> discovery, static-header rotation and organization sharing.




## OpenAPI

````yaml /api/openapi.json post /v1/integrations-connect
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-11-21'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/integrations-connect:
    post:
      summary: >
        ConnectIntegrationAPI mirrors erdo_connect_integration, including remote
        MCP
      description: |
        discovery, static-header rotation and organization sharing.
      operationId: POST:mcp.ConnectIntegrationAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                app:
                  type: string
                credentials:
                  additionalProperties:
                    type: string
                  description: >
                    service-account JSON). encore:"sensitive" keeps it out of
                    request trace storage — the same treatment
                    integration.CreateIntegrationRequest.Credentials gets.
                  title: >
                    Credentials is caller-supplied secret material (DB
                    passwords, API keys,
                  type: object
                credentials_from_integration_id:
                  description: >
                    current credential the caller supplied, in any organization.
                    A key in a never-viewable field cannot be read back through
                    the product, so this is how an agency lends a vendor key
                    connected inside one client to others. The integration
                    service owns every bound (verified current supplier,
                    key-authenticated, active, same app); this surface adds that
                    no credentials may accompany it, no rotation, and a native
                    config. Like ManagedAccess it carries no jsonschema tag and
                    handleConnectIntegration clears it, so a model cannot take a
                    credential into another organization; REST and CLI, which a
                    person drives, honour it.
                  title: >
                    CredentialsFromIntegrationID connects the app by reusing the
                    credential of a

                    connection whose
                  type: string
                integration_id:
                  type: string
                managed_access:
                  description: >
                    only on the native credential path: a Pipedream connection
                    is not an integration row this column lives on, and an OAuth
                    grant is a named person's account that must not be spent on
                    another business's behalf. Both are refused rather than
                    ignored, since silence would make the caller believe clients
                    could use the key. It carries no jsonschema tag and
                    handleConnectIntegration clears it before the logic runs, so
                    no MCP caller can set it: widening which organizations a
                    credential serves is not a decision a model should take.
                  title: >
                    ManagedAccess lends the new connection to the organizations
                    this one manages.

                    It is honoured
                  type: string
                mcp_headers:
                  additionalProperties:
                    type: string
                  description: >
                    from readback. Rotation replaces the whole map; an empty map
                    removes them.
                  title: >
                    MCPHeaders are static authentication headers, encrypted at
                    rest and omitted
                  type: object
                mcp_url:
                  description: |
                    required, except literal loopback HTTP in local development.
                  title: >
                    MCPURL is the remote Streamable HTTP endpoint for app=mcp.
                    HTTPS is
                  type: string
                member_access:
                  description: >
                    for writes. Visibility is granted separately by
                    share\_with\_org.
                  title: >
                    MemberAccess controls shared MCP members: read_only by
                    default, or full
                  type: string
                name:
                  type: string
                refresh_tools:
                  type: boolean
                return_url:
                  description: >
                    authorization at connect\_url. Only meaningful for OAuth
                    apps (native OAuth and Pipedream) that hand back a
                    connect\_url. Empty returns the user to Erdo's data page —
                    the default for MCP/CLI callers with no product origin of
                    their own; a portal built on /v1 passes its own page so the
                    operator lands back on it. Must be an absolute http(s) URL
                    with no embedded credentials.
                  title: >
                    ReturnURL is where the browser lands after the user finishes
                    the OAuth
                  type: string
                rotate_credentials:
                  description: >
                    instead of adding a second one. A rotated key must land on
                    the connection everything else already references — a
                    sibling connection leaves every pinned widget, automation
                    and shared grant pointing at the dead key.
                  title: >
                    RotateCredentials points the credentials at the app's
                    existing connection
                  type: boolean
                scopes:
                  items:
                    type: string
                  type: array
                share_with_org:
                  description: >
                    instead of the default private-to-the-connector. A
                    credential connected headlessly is usually org
                    infrastructure (a customer org's calendar, a shared SaaS
                    key) that teammates and org agents must be able to see and
                    build on — private-by-default is right for a personal OAuth
                    grant, wrong for that.
                  title: >
                    ShareWithOrg makes the new connection visible to the whole
                    organization
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  app:
                    type: string
                  connect_url:
                    type: string
                  integration_id:
                    type: string
                  mcp_header_names:
                    items:
                      type: string
                    type: array
                  next_step:
                    type: string
                  organization_name:
                    type: string
                  organization_slug:
                    type: string
                  status:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  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_...).

````

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