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

> ## Agent Instructions
> These docs cover three products: TrustGate (AI agent gateway), TrustGuard (runtime security), and TrustTest (AI red teaming). Start from each product overview for the definition and How it works. Prefer the .md URL next to a page in /llms.txt when you need the full article. Use /llms-full.txt for a single-file dump of the site.

# Mint a connect link for an MCP application's upstream accounts

> Returns a connect ticket an admin can open to link the application's own accounts on the servers that forward a stored credential — the same page the api-key self-service flow uses, without needing one of the application's credentials. Naming a registry narrows the ticket to that one server; omitting it covers every server of the application that forwards a credential. The ticket is pinned to this consumer and to those providers, revalidated on redemption, audited, and short-lived.



## OpenAPI

````yaml /trustgate/api/openapi.json post /v1/gateways/{gateway_id}/consumers/{id}/upstream-accounts/link
openapi: 3.0.0
info:
  description: >-
    Administrative API for managing gateways and their registries, policies,
    consumers and auth credentials.
  title: TrustGate Admin API
  contact:
    name: NeuralTrust
    url: https://neuraltrust.ai/contact
    email: support@neuraltrust.ai
  version: '1.0'
servers:
  - url: /
security: []
paths:
  /v1/gateways/{gateway_id}/consumers/{id}/upstream-accounts/link:
    post:
      tags:
        - consumers
      summary: Mint a connect link for an MCP application's upstream accounts
      description: >-
        Returns a connect ticket an admin can open to link the application's own
        accounts on the servers that forward a stored credential — the same page
        the api-key self-service flow uses, without needing one of the
        application's credentials. Naming a registry narrows the ticket to that
        one server; omitting it covers every server of the application that
        forwards a credential. The ticket is pinned to this consumer and to
        those providers, revalidated on redemption, audited, and short-lived.
      parameters:
        - description: Gateway id
          name: gateway_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: Consumer id
          name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: Authorize only this bound MCP server
          name: registry_id
          in: query
          schema:
            type: string
            format: uuid
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_consumer_response.ConsumerConnectLink
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '404':
          description: The consumer does not exist, or the registry is not bound to it
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '409':
          description: >-
            The consumer acts for users, or the named server carries its own
            credential
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_consumer_response.ConsumerConnectLink:
      type: object
      properties:
        connect_path:
          type: string
        consumer_path:
          type: string
        expires_at:
          type: string
        providers:
          type: array
          items:
            type: string
        ticket:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````