Klanex Connections API

The Connections API from Klanex — 4 operation(s) for connections.

GitHub OpenAPI

Operations 6

POST /v1/connections Create a vault connection (managed credential) #
GET /v1/connections List the tenant's connections (never returns secrets) #
GET /v1/connections/{id} Fetch a connection (no secrets) #
DELETE /v1/connections/{id} Remove a connection #
GET /v1/connections/{id}/authorize Begin OAuth consent for an authorization-code connection #
GET /v1/connections/callback OAuth redirect target (provider → klanex) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/klanexai-com:klanexai-com-connections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

klanexai-com-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: klanex Connections API
  version: 0.7.0
  description: 'Tool orchestration engine for AI agents. Submit tool-use intents for

    reliable asynchronous execution: schema gating, retries with backoff,

    circuit breakers, encrypted credentials, human-in-the-loop approvals,

    replay, and HMAC-signed webhooks.


    Prose companion: docs/api.md. Client SDKs: klanex-js (@klanex/sdk),

    klanex-python (klanex).'
servers:
- url: https://api.klanexai.com
  description: production
- url: https://api.sandbox.klanexai.com
  description: sandbox — same code, Stripe test mode, separate accounts/data
security:
- ApiKeyAuth: []
tags:
- name: Connections
paths:
  /v1/connections:
    post:
      operationId: createConnection
      summary: Create a vault connection (managed credential)
      description: Store a credential once and reference it by connection_id on a target, instead of passing raw headers. Secrets are KMS-sealed; OAuth tokens are refreshed automatically at execution time.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - provider
              - grant_type
              properties:
                provider:
                  type: string
                  description: Label; known values (github, google, slack, hubspot, salesforce, stripe) auto-fill OAuth endpoints.
                grant_type:
                  type: string
                  enum:
                  - static_bearer
                  - oauth2_client_credentials
                  - oauth2_authorization_code
                token:
                  type: string
                  description: static_bearer only.
                client_id:
                  type: string
                  description: oauth2 grants.
                client_secret:
                  type: string
                  description: oauth2 grants.
                authorize_url:
                  type: string
                  format: uri
                token_url:
                  type: string
                  format: uri
                scopes:
                  type: array
                  items:
                    type: string
                inject_header:
                  type: string
                  default: Authorization
                token_prefix:
                  type: string
                  default: 'Bearer '
      responses:
        '201':
          description: 'Created. For oauth2_authorization_code the response includes an authorize_url to open in a browser for consent.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Connections
    get:
      operationId: listConnections
      summary: List the tenant's connections (never returns secrets)
      responses:
        '200':
          description: Connections.
          content:
            application/json:
              schema:
                type: object
                properties:
                  connections:
                    type: array
                    items:
                      $ref: '#/components/schemas/Connection'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Connections
  /v1/connections/{id}:
    get:
      operationId: getConnection
      summary: Fetch a connection (no secrets)
      parameters:
      - $ref: '#/components/parameters/ConnectionID'
      responses:
        '200':
          description: Connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Connections
    delete:
      operationId: deleteConnection
      summary: Remove a connection
      parameters:
      - $ref: '#/components/parameters/ConnectionID'
      responses:
        '200':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Connections
  /v1/connections/{id}/authorize:
    get:
      operationId: authorizeConnection
      summary: Begin OAuth consent for an authorization-code connection
      description: 302-redirects the operator's browser to the provider's consent screen. The return trip lands on /v1/connections/callback.
      parameters:
      - $ref: '#/components/parameters/ConnectionID'
      responses:
        '302':
          description: Redirect to the provider consent screen.
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Connection does not use the authorize flow (NOT_AUTHORIZABLE).
      tags:
      - Connections
  /v1/connections/callback:
    get:
      operationId: oauthCallback
      summary: OAuth redirect target (provider → klanex)
      description: Not API-key authenticated; trust comes from the one-time state planted on the connection. Exchanges the code for tokens and shows an HTML result page.
      security: []
      parameters:
      - name: code
        in: query
        schema:
          type: string
      - name: state
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Consent completed; connection is connected.
        '400':
          description: Missing/invalid code or state.
      tags:
      - Connections
components:
  responses:
    BadRequest:
      description: Malformed request (bad URL, unsupported method, invalid JSON, bad filter).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthenticated:
      description: Missing or invalid X-API-Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No such execution for this tenant.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Per-tenant rate limit exceeded; retry after Retry-After seconds.
      headers:
        Retry-After:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    ConnectionID:
      name: id
      in: path
      required: true
      schema:
        type: string
      example: con_9b1c2f6a-...
  schemas:
    Connection:
      type: object
      description: Secret-free view of a vault connection.
      properties:
        connection_id:
          type: string
        provider:
          type: string
        grant_type:
          type: string
          enum:
          - static_bearer
          - oauth2_client_credentials
          - oauth2_authorization_code
        status:
          type: string
          enum:
          - pending
          - connected
          - error
        inject_header:
          type: string
        scopes:
          type: array
          items:
            type: string
        expires_at:
          type: string
          format: date-time
        authorize_url:
          type: string
          description: Present on create for authorization-code connections.
        last_error:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            problems:
              type: array
              items:
                type: string
            llm_hint:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Tenant API key issued at onboarding: "klx_live_..." (production) or "klx_test_..." (sandbox). Using a key against the other environment returns 401 WRONG_ENVIRONMENT. Legacy bare "klx_..." keys are accepted.

        '