TrustFabric Agent Keys API

Self-serve sandbox and merchant-issued agent key management for MCP callers

GitHub OpenAPI

Operations 4

GET /v1/agent_keys List agent keys #
POST /v1/agent_keys Issue an agent key #
GET /v1/agent_keys/{id} Get an agent key #
POST /v1/agent_keys/{id}/revoke Revoke an agent key #

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/trustfabric-ai:trustfabric-ai-agent-keys-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

trustfabric-ai-agent-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: No Fate Platform
  description: 'Complete payment processing platform with PSP parity: payments, settlements, disputes, billing, payouts, verification, webhooks, and platform management. Supports date-based API versioning via the API-Version header (default: 2025-01-01). All amounts are in minor units (cents). All timestamps are RFC 3339 UTC.'
  title: No Fate Payment Platform Agent Keys API
  version: 1.0.0
  x-api-versioning: Date-based (YYYY-MM-DD) via API-Version header. See /v1/versions for all supported versions.
servers:
- description: Current environment
  url: /
security:
- BearerAuth: []
tags:
- description: Self-serve sandbox and merchant-issued agent key management for MCP callers
  name: Agent Keys
paths:
  /v1/agent_keys:
    get:
      description: List agent keys issued by the authenticated merchant. Responses include each key's token hash, never the plaintext token
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKeyList'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '429':
          description: Rate limited
        '500':
          description: Internal server error
      summary: List agent keys
      tags:
      - Agent Keys
      operationId: getV1AgentKeys
      x-operation-id-source: derived
    post:
      description: Issue a live agent key (agk_live_*) scoped by an AgentPolicy (spend cap, allowed tools/providers/currencies, rate limit). The plaintext token is returned once and never again
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueAgentKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKeyIssued'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '429':
          description: Rate limited
        '500':
          description: Internal server error
      summary: Issue an agent key
      tags:
      - Agent Keys
      operationId: postV1AgentKeys
      x-operation-id-source: derived
  /v1/agent_keys/{id}:
    get:
      description: Retrieve a single agent key record by ID
      parameters:
      - description: Agent key ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKeyRecord'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '429':
          description: Rate limited
        '500':
          description: Internal server error
      summary: Get an agent key
      tags:
      - Agent Keys
      operationId: getV1AgentKeysById
      x-operation-id-source: derived
  /v1/agent_keys/{id}/revoke:
    post:
      description: Immediately revoke an agent key; subsequent MCP calls using its token are rejected with AGENT_KEY_REVOKED
      parameters:
      - description: Agent key ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKeyRecord'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '429':
          description: Rate limited
        '500':
          description: Internal server error
      summary: Revoke an agent key
      tags:
      - Agent Keys
      operationId: postV1AgentKeysByIdRevoke
      x-operation-id-source: derived
components:
  schemas:
    IssueAgentKeyRequest:
      properties:
        expires_at:
          description: Optional expiry
          format: date-time
          type:
          - string
          - 'null'
        name:
          description: Display name for the key
          type: string
        policy:
          $ref: '#/components/schemas/AgentPolicy'
      required:
      - name
      type: object
    Error:
      properties:
        details:
          description: Additional error context
        error:
          description: Error code
          type: string
        message:
          description: Human-readable message
          type: string
      required:
      - error
      - message
      type: object
    AgentPolicy:
      properties:
        allowed_currencies:
          description: Currencies this key may transact in
          items:
            description: ISO 4217 currency code
            type: string
          type: array
        allowed_providers:
          description: Providers this key may route through
          items:
            description: Provider name
            type: string
          type: array
        allowed_tools:
          description: MCP tool names this key may call
          items:
            description: Tool name
            type: string
          type: array
        max_amount_minor_cents:
          description: Per-transaction cap in minor units
          format: int64
          type: integer
        rate_limit_per_minute:
          description: Calls per minute allowed for this key
          format: int64
          type: integer
        require_approval_above:
          description: Amount above which execute_payment requires human approval
          format: int64
          type: integer
      type: object
    AgentKeyList:
      properties:
        agent_keys:
          description: Agent keys issued by this merchant
          items:
            $ref: '#/components/schemas/AgentKeyRecord'
          type: array
      required:
      - agent_keys
      type: object
    AgentKeyRecord:
      properties:
        CallCount:
          description: Total calls made with this key
          format: int64
          type: integer
        CreatedAt:
          description: Creation timestamp
          format: date-time
          type: string
        ExpiresAt:
          description: Expiry timestamp, if set
          format: date-time
          type:
          - string
          - 'null'
        ID:
          description: Agent key ID
          type: string
        IsSandbox:
          description: Whether this is a sandbox (agk_test_*) key
          type: boolean
        LastUsedAt:
          description: Last time this key was used
          format: date-time
          type:
          - string
          - 'null'
        MerchantID:
          description: Owning merchant ID
          type: string
        Name:
          description: Display name
          type: string
        Policy:
          $ref: '#/components/schemas/AgentPolicy'
        Status:
          description: Key status
          enum:
          - active
          - revoked
          - expired
          type: string
        TokenHash:
          description: SHA-256 hash of the token (never the plaintext token)
          type: string
        UpdatedAt:
          description: Last update timestamp
          format: date-time
          type: string
        Version:
          description: Optimistic-lock version
          format: int64
          type: integer
      required:
      - ID
      - MerchantID
      - Name
      - Status
      - CreatedAt
      type: object
    AgentKeyIssued:
      properties:
        created_at:
          description: Creation timestamp
          format: date-time
          type: string
        expires_at:
          description: Expiry timestamp, if set
          format: date-time
          type:
          - string
          - 'null'
        id:
          description: Agent key ID
          type: string
        name:
          description: Display name
          type: string
        note:
          description: Human-readable usage note
          type: string
        policy:
          $ref: '#/components/schemas/AgentPolicy'
        status:
          description: Key status
          enum:
          - active
          - revoked
          - expired
          type: string
        token:
          description: Bearer token (agk_live_* or agk_test_*), shown once and never again
          type: string
      required:
      - id
      - name
      - token
      - policy
      - status
      - created_at
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: 'API key authentication: sk_live_* (legacy) or rk_live_* (scoped)'
      scheme: bearer
      type: http
    SessionAuth:
      description: Session-based authentication for dashboard access
      in: cookie
      name: session_id
      type: apiKey