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

# List connections

> Newest first, across all four types. `workerId` and `clientId` narrow to connections scoped to exactly that Worker or Client — they do not answer what that Worker can resolve, so org-wide connections it also reaches are not included. `?view=apps` lists the CONNECTED APPS instead: each is an app a person signed in to or pasted a key for, placed at one or more tiers, and its `placements` say where it may be used. That view takes no scope filter. No entry in either list carries a stored value.



## OpenAPI

````yaml /openapi.json get /api/v1/connections
openapi: 3.1.0
info:
  title: Ergoly platform API
  version: 1.0.0
  description: >-
    Read and change one organization's own Ergoly environment. Every route is
    scoped to the organization the presented credential resolves to; there is no
    parameter that widens it. The human-readable reference is served from the
    same namespace at `/api/v1/docs`, behind the same credential.


    The namespace's front door is `GET /api/v1`, and it is deliberately absent
    from `paths` below. It answers without a credential — what this API is, how
    an organization admin mints a key, and where the reference lives — so it is
    the way in to this contract rather than a part of it: it has no scope, takes
    no parameters, and there is nothing about it for a generated client to call.
    Every `unauthorized` refusal carries that same URL as `error.docs`.
servers:
  - url: https://control.ergoly.ai
security:
  - orgApiKey: []
tags:
  - name: auth
    description: How to present a key, what it is scoped to, and what a 401 means.
  - name: organization
    description: Which organization your credential resolves to.
  - name: workers
    description: The Slack apps and bot identities in your organization.
  - name: eworks
    description: The runtime instances under a Worker — one core, one per bound Client.
  - name: clients
    description: The customers a Worker can be scoped to, and how to bind one.
  - name: channels
    description: Which Slack rooms a Worker answers in, and who it answers as.
  - name: tasks
    description: >-
      Tasks handed between Workers and people, scheduled jobs, their targets,
      and their run history.
  - name: jobs
    description: How a provisioning run is going — the other half of every 202.
  - name: memory
    description: Read and write the memory tiers an ework mounts.
  - name: connections
    description: The credentials your agents use, and the hosts they are injected on.
  - name: webhooks
    description: Inbound URLs an outside system can POST to, each of which starts a turn.
  - name: activity
    description: Your organization's audit feed.
  - name: usage
    description: Cost, turn outcomes and a per-day pulse over a window you choose.
  - name: errors
    description: The closed set of refusal codes, and what to do about each.
paths:
  /api/v1/connections:
    get:
      tags:
        - connections
      summary: List connections
      description: >-
        Newest first, across all four types. `workerId` and `clientId` narrow to
        connections scoped to exactly that Worker or Client — they do not answer
        what that Worker can resolve, so org-wide connections it also reaches
        are not included. `?view=apps` lists the CONNECTED APPS instead: each is
        an app a person signed in to or pasted a key for, placed at one or more
        tiers, and its `placements` say where it may be used. That view takes no
        scope filter. No entry in either list carries a stored value.
      operationId: listConnections
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Page size. Defaults to 50, clamped at 200. A value that is not a
            positive integer is a 400.
          schema:
            type: integer
            description: >-
              Page size. Defaults to 50, clamped at 200. A value that is not a
              positive integer is a 400.
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque keyset cursor from the previous page's `page.nextCursor`. A
            cursor this API did not issue is a 400, never a silent page one.
          schema:
            type: string
            description: >-
              Opaque keyset cursor from the previous page's `page.nextCursor`. A
              cursor this API did not issue is a 400, never a silent page one.
        - name: view
          in: query
          required: false
          description: >-
            Which store to list. Omitted, the plain secrets, connected accounts,
            provider apps and MCP servers below. `apps` lists the CONNECTED APPS
            instead — each an app placed at a tier, in the `AppConnection` shape
            — and takes no `workerId` or `clientId`; read each connection's
            `placements`. Any other value is a 400.
          schema:
            type: string
            enum:
              - apps
            description: >-
              Which store to list. Omitted, the plain secrets, connected
              accounts, provider apps and MCP servers below. `apps` lists the
              CONNECTED APPS instead — each an app placed at a tier, in the
              `AppConnection` shape — and takes no `workerId` or `clientId`;
              read each connection's `placements`. Any other value is a 400.
        - name: workerId
          in: query
          required: false
          description: >-
            Narrow to connections scoped to exactly this Worker. This is the
            row's own scope column, not what the Worker can resolve — org-wide
            connections a Worker also resolves are NOT included. A malformed id
            is a 400.
          schema:
            type: string
            description: >-
              Narrow to connections scoped to exactly this Worker. This is the
              row's own scope column, not what the Worker can resolve — org-wide
              connections a Worker also resolves are NOT included. A malformed
              id is a 400.
        - name: clientId
          in: query
          required: false
          description: >-
            Narrow to connections scoped to exactly this Client, on the same
            exact-match basis as `workerId`. A malformed id is a 400.
          schema:
            type: string
            description: >-
              Narrow to connections scoped to exactly this Client, on the same
              exact-match basis as `workerId`. A malformed id is a 400.
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Connection'
                    description: The page.
                  page:
                    $ref: '#/components/schemas/PageInfo'
                required:
                  - data
                  - page
                additionalProperties: false
              example:
                data:
                  - id: 6d5c4b3a-2918-4706-9f8e-1d2c3b4a5968
                    key: stripe_live
                    kind: api_key
                    type: secret
                    scope: org
                    workerId: null
                    clientId: null
                    internalOnly: false
                    managed: false
                    hosts:
                      - api.stripe.com
                    description: Billing — subscriptions, invoices and refunds.
                    provider: null
                    account: null
                    providerScopes: []
                    expiresAt: null
                    health: null
                    issuer: null
                    issuerHost: null
                    mcpEndpoint: null
                    mcpTransport: null
                    mcpTools: []
                    mcpStatus: null
                    mcpServerName: null
                    providerClientId: null
                    redirectUri: null
                    createdAt: '2026-02-01T09:14:00.000Z'
                    updatedAt: '2026-02-01T09:14:00.000Z'
                  - id: 1f2e3d4c-5b6a-4978-8e6f-5a4b3c2d1e09
                    key: github_main
                    kind: oauth
                    type: oauth
                    scope: worker
                    workerId: 8f1c2d3e-9a4b-4c5d-8e6f-1a2b3c4d5e6f
                    clientId: null
                    internalOnly: false
                    managed: false
                    hosts:
                      - api.github.com
                    description: null
                    provider: github
                    account: acme-support
                    providerScopes:
                      - repo
                      - read:org
                    expiresAt: '2026-03-01T09:14:00.000Z'
                    health: healthy
                    issuer: null
                    issuerHost: null
                    mcpEndpoint: null
                    mcpTransport: null
                    mcpTools: []
                    mcpStatus: null
                    mcpServerName: null
                    providerClientId: null
                    redirectUri: null
                    createdAt: '2026-01-20T11:02:00.000Z'
                    updatedAt: '2026-02-18T08:40:00.000Z'
                page:
                  limit: 50
                  hasMore: true
                  nextCursor: >-
                    MjAyNi0wMy0wNFQwOToxNDowMi4wMDBafDhmMWMyZDNlLTlhNGItNGM1ZC04ZTZmLTFhMmIzYzRkNWU2Zg
        '400':
          description: '`invalid_request`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: '`unauthorized`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - orgApiKey:
            - connections:read
components:
  schemas:
    Connection:
      type: object
      properties:
        id:
          type: string
          description: The connection's id.
        key:
          type: string
          description: The slug the agent and the egress gateway know it by.
        kind:
          type: string
          description: '`api_key`, `secret`, `basic`, `oauth` or `oauth-app`.'
        type:
          type: string
          enum:
            - secret
            - oauth
            - provider-app
            - mcp
          description: >-
            Which family this is. Decides which of the state fields below are
            set.
        scope:
          type: string
          enum:
            - org
            - worker
            - client
          description: >-
            Which identities resolve it. Most specific wins: client, then
            worker, then org.
        workerId:
          type:
            - string
            - 'null'
          description: The Worker it is scoped to, when `scope` is `worker`.
        clientId:
          type:
            - string
            - 'null'
          description: The Client it is scoped to, when `scope` is `client`.
        internalOnly:
          type: boolean
          description: >-
            Hidden from client-tier eworks. Never true on a client-scoped
            connection.
        managed:
          type: boolean
          description: System-managed. Readable, never modifiable.
        hosts:
          type: array
          items:
            type: string
            description: A hostname.
          description: >-
            Hostnames the egress gateway injects this credential on. A
            connection with no host is never injected.
        description:
          type:
            - string
            - 'null'
          description: >-
            What this connection is for, in an operator's own words. Carried to
            a worker in the per-turn connections index, where it is the only
            thing that can say a connection named `lemlist` is how LinkedIn
            outreach gets done. Null when nobody wrote one.
        provider:
          type:
            - string
            - 'null'
          description: Provider id, for an OAuth account, provider app or MCP server.
        account:
          type:
            - string
            - 'null'
          description: The connected account's label, as the provider reported it.
        providerScopes:
          type: array
          items:
            type: string
            description: A scope.
          description: OAuth scopes the provider granted.
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the access token expires, if the provider said.
        health:
          type:
            - string
            - 'null'
          description: '`healthy`, `expiring`, `expired` or `unknown`.'
        issuer:
          type:
            - string
            - 'null'
          description: An MCP server's canonical identity.
        issuerHost:
          type:
            - string
            - 'null'
          description: That issuer's host — what an operator recognises.
        mcpEndpoint:
          type:
            - string
            - 'null'
          description: Where the agent POSTs MCP calls.
        mcpTransport:
          type:
            - string
            - 'null'
          description: The observed MCP transport, or `unknown`.
        mcpTools:
          type: array
          items:
            type: string
            description: A tool name.
          description: Tools advertised at the last handshake.
        mcpStatus:
          type:
            - string
            - 'null'
          description: >-
            `ok`, `failed`, `pending`, or `needs_reconnect` — the last meaning
            no endpoint was ever recorded, so it cannot work until it is
            connected again.
        mcpServerName:
          type:
            - string
            - 'null'
          description: The server's own product name, when it supplied one.
        providerClientId:
          type:
            - string
            - 'null'
          description: >-
            A provider app's PUBLIC OAuth client id. Its client secret has no
            field here.
        redirectUri:
          type:
            - string
            - 'null'
          description: The redirect URI Ergoly derives for this provider.
        createdAt:
          type: string
          format: date-time
          description: When it was created.
        updatedAt:
          type: string
          format: date-time
          description: When it last changed.
      required:
        - id
        - key
        - kind
        - type
        - scope
        - workerId
        - clientId
        - internalOnly
        - managed
        - hosts
        - description
        - provider
        - account
        - providerScopes
        - expiresAt
        - health
        - issuer
        - issuerHost
        - mcpEndpoint
        - mcpTransport
        - mcpTools
        - mcpStatus
        - mcpServerName
        - providerClientId
        - redirectUri
        - createdAt
        - updatedAt
      additionalProperties: false
    PageInfo:
      type: object
      description: Present on every list, even when there is nothing more to fetch.
      properties:
        limit:
          type: integer
          description: The page size actually applied, after clamping.
        hasMore:
          type: boolean
          description: True when another page exists.
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Feed back as `?cursor=`. Null when `hasMore` is false — and always
            null on a list that takes no `cursor` parameter, which ranks its
            rows rather than paging them and says so on its own page. Narrow
            that list's `query` instead.
      required:
        - limit
        - hasMore
        - nextCursor
      additionalProperties: false
    Error:
      type: object
      description: The one error shape. Every refusal in this namespace has it.
      properties:
        error:
          type: object
          description: The refusal.
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - not_found
                - invalid_request
                - conflict
                - quota_exceeded
                - rate_limited
                - upstream_error
                - gone
              description: The machine-stable half. Branch on this, never on `message`.
            message:
              type: string
              description: Prose for a human reading a terminal.
            docs:
              type: string
              description: >-
                Where to learn how to authenticate. Present on `unauthorized`
                and on nothing else — it is the one refusal a caller can reach
                with no credential at all, so it is the one that has to say
                where the way in is.
          required:
            - code
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    orgApiKey:
      type: http
      scheme: bearer
      description: >-
        An organization-scoped API key, minted in control under Settings → API
        keys. Every failure to authenticate answers one identical 401: "Provide
        a valid organization-scoped API key or an active session." Each
        operation names the one scope it is filed under,
        `<resource>:<read|write>`, where the resource is the first path segment
        after `/api/v1/`; a key minted today carries all 22 of them. Scopes are
        RECORDED — on the key and on every audit row — and are not yet enforced:
        no request is refused for want of one.

````

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