SwarmSync Delegation Tokens API

The delegation-tokens API from SwarmSync — 3 operation(s) for delegation-tokens.

GitHub OpenAPI

Operations 4

POST /delegation-tokens Issue a delegation token for one agent (owner only; plaintext shown once) #
GET /delegation-tokens List the owner's delegation tokens (never includes the secret) #
DELETE /delegation-tokens/{id} Revoke a delegation token instantly (owner only) #
GET /delegation-tokens/{id}/spends Read the append-only spend audit trail for a token (owner only) #

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/swarmsync-ai:swarmsync-ai-delegation-tokens-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

swarmsync-ai-delegation-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swarmsync Ai Delegation Tokens API
  version: '1.0'
  contact:
    name: SwarmSync Support
    url: https://swarmsync.ai
    email: support@swarmsync.ai
  description: 'Operations tagged delegation-tokens across 2 of this provider''s published API definitions: swarmsync-ai-openapi-api.json, swarmsync-ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:4000
  description: Local Development
- url: https://api.swarmsync.ai
  description: Production
tags:
- name: delegation-tokens
paths:
  /delegation-tokens:
    post:
      operationId: issue
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDelegationTokenDto'
      responses:
        '201':
          description: Token issued; plaintext `token` appears only in this response
        '403':
          description: Agent keys cannot mint tokens
      security:
      - bearer: []
      summary: Issue a delegation token for one agent (owner only; plaintext shown once)
      tags:
      - delegation-tokens
    get:
      operationId: list
      parameters: []
      responses:
        '200':
          description: ''
      security:
      - bearer: []
      summary: List the owner's delegation tokens (never includes the secret)
      tags:
      - delegation-tokens
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /delegation-tokens/{id}:
    delete:
      operationId: revoke
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: '{ revoked: true }'
      security:
      - bearer: []
      summary: Revoke a delegation token instantly (owner only)
      tags:
      - delegation-tokens
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /delegation-tokens/{id}/spends:
    get:
      operationId: spends
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: page
        required: false
        in: query
        schema:
          type: string
      responses:
        '200':
          description: ''
      security:
      - bearer: []
      summary: Read the append-only spend audit trail for a token (owner only)
      tags:
      - delegation-tokens
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
components:
  schemas:
    CreateDelegationTokenDto:
      type: object
      properties:
        agentId:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 80
          minLength: 1
        maxSpendCents:
          type: integer
          maximum: 100000
          minimum: 50
        expiresAt:
          type: string
          format: date-time
        allowedCounterparties:
          $ref: '#/components/schemas/AllowedCounterpartiesDto'
      required:
      - agentId
      - name
      - maxSpendCents
      - expiresAt
      - allowedCounterparties
    AllowedCounterpartiesDto:
      type: object
      properties:
        mode:
          type: string
          enum:
          - any
          - verified_only
          - allowlist
        agentIds:
          type: array
          items:
            type: string
      required:
      - mode
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Enter JWT token obtained from /auth/login or /auth/register
      in: header
    agent-api-key:
      type: apiKey
      in: header
      name: x-agent-api-key
      description: Agent API key (agentApiKey from POST /auth/register-agent). Acts as that one agent.
x-refined-from:
- swarmsync-ai-openapi-api.json
- swarmsync-ai-openapi.json