{
  "openapi": "3.1.0",
  "info": {
    "title": "sendstables public API",
    "version": "1.0.0",
    "summary": "Quote native USDC transfers between chains (Circle CCTP) and build prefilled swap links.",
    "description": "Read-only, no authentication. Use it to tell a user what a cross-chain USDC transfer costs and to give them a prefilled link (`swap_link`) that opens sendstables with the transfer ready to review and confirm. Same-chain sends (from = to, e.g. arbitrum to arbitrum) to another address are supported: one plain USDC transfer, no Circle fee, and our fee is cost-only; they need a `recipient`. Nothing here moves funds. Amounts are USDC decimal strings and include fees. Chains are slugs from /api/v1/chains (e.g. base, arbitrum, ethereum, solana, stellar). Rate limits are per IP; on 429 wait 60 seconds.\n\nSwap links: https://sendstables.com/swap?from=<slug>&to=<slug>&amount=<usdc>[&recipient=<address>][&ref=<tag>]. Without a recipient the link moves USDC to the user's own wallet on the destination chain. Never invent recipient addresses.\n\nDelivery to Cronos, Injective, Morph, Pharos, Plasma, X Layer isn't available yet: quotes to them return DESTINATION_UNAVAILABLE (listChains marks them `destination: false`). They still work as sources, and same-chain sends on them work.",
    "contact": {
      "name": "sendstables",
      "url": "https://sendstables.com/ai"
    }
  },
  "servers": [
    {
      "url": "https://sendstables.com"
    }
  ],
  "externalDocs": {
    "description": "MCP server (no-auth tools at /api/mcp/public)",
    "url": "https://sendstables.com/ai/mcp"
  },
  "paths": {
    "/api/v1/chains": {
      "get": {
        "operationId": "listChains",
        "summary": "List supported chains",
        "description": "Every chain sendstables can send USDC from or to, with the slug to use in other calls.",
        "responses": {
          "200": {
            "description": "Supported chains",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainList"
                },
                "example": {
                  "object": "list",
                  "network": "mainnet",
                  "data": [
                    {
                      "key": "Base",
                      "slug": "base",
                      "name": "Base",
                      "kind": "evm",
                      "cctp_domain": 6,
                      "can_send_from": true,
                      "can_send_to": true,
                      "delivery": "circle_forwarding",
                      "fast": true,
                      "gas_token": "ETH"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/quote": {
      "get": {
        "operationId": "getQuote",
        "summary": "Preview the fees for a USDC transfer between chains or on the same chain",
        "description": "Returns an unsigned preview: fees, the amount that arrives (estimate and guaranteed minimum) and a prefilled `swap_link`. Show the `summary` and give the user the `swap_link`; they confirm in the app. A preview can't be executed. With `from` = `to` it prices a same-chain send to `recipient` (required): `delivery` is `same_chain_transfer`, `circle_fee_usdc` is \"0\" and our fee is cost-only (no percentage).",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Source chain slug (see listChains).",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "example": "base"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Destination chain slug. The same as `from` for a same-chain send to another address (then `recipient` is required).",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "example": "solana"
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "description": "USDC the user pays, fees included.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,7}(\\.\\d{1,6})?$"
            },
            "example": "50"
          },
          {
            "name": "recipient",
            "in": "query",
            "required": false,
            "description": "Destination address on `to` (0x… EVM, base58 Solana, G… Stellar). Omit for the user's own wallet; required when `from` = `to`. Only use an address the user gave you.",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          },
          {
            "name": "ref",
            "in": "query",
            "required": false,
            "description": "Attribution tag copied into swap_link.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Preview quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotePreview"
                },
                "examples": {
                  "cross_chain": {
                    "summary": "Base to the user's own Solana wallet",
                    "value": {
                      "object": "quote_preview",
                      "network": "mainnet",
                      "from": {
                        "key": "Base",
                        "slug": "base",
                        "name": "Base",
                        "kind": "evm"
                      },
                      "to": {
                        "key": "Solana",
                        "slug": "solana",
                        "name": "Solana",
                        "kind": "solana"
                      },
                      "amount_usdc": "50",
                      "sendstables_fee_usdc": "0.25",
                      "circle_fee_usdc": "0.006",
                      "total_fee_usdc": "0.256",
                      "max_total_fee_usdc": "0.2572",
                      "receive_estimate_usdc": "49.744",
                      "receive_min_usdc": "49.7428",
                      "delivery": "circle_forwarding",
                      "speed": "fast",
                      "recipient": null,
                      "recipient_checked": false,
                      "creates_recipient_usdc_account": false,
                      "assumptions": [
                        "No recipient given: priced for the user's own Solana wallet.",
                        "Assumes the recipient already has a USDC account; creating one costs a little more.",
                        "Fees track live gas and Circle fees; the final quote is shown in the app before the user confirms."
                      ],
                      "quoted_at": "2026-10-09T12:00:00.000Z",
                      "expires_at": "2026-10-09T12:02:00.000Z",
                      "swap_link": "https://sendstables.com/swap?from=base&to=solana&amount=50",
                      "executable": false,
                      "summary": "Send 50 USDC from Base to your Solana wallet on Solana: about 49.744 USDC arrives (at least 49.7428). …"
                    }
                  },
                  "same_chain": {
                    "summary": "Same chain: to another address on Arbitrum",
                    "value": {
                      "object": "quote_preview",
                      "network": "mainnet",
                      "from": {
                        "key": "Arbitrum",
                        "slug": "arbitrum",
                        "name": "Arbitrum",
                        "kind": "evm"
                      },
                      "to": {
                        "key": "Arbitrum",
                        "slug": "arbitrum",
                        "name": "Arbitrum",
                        "kind": "evm"
                      },
                      "amount_usdc": "5000",
                      "sendstables_fee_usdc": "0.1",
                      "circle_fee_usdc": "0",
                      "total_fee_usdc": "0.1",
                      "max_total_fee_usdc": "0.1",
                      "receive_estimate_usdc": "4999.9",
                      "receive_min_usdc": "4999.9",
                      "delivery": "same_chain_transfer",
                      "speed": "same_chain",
                      "recipient": "0x1111111111111111111111111111111111111111",
                      "recipient_checked": true,
                      "creates_recipient_usdc_account": false,
                      "assumptions": [
                        "Same-chain send: one USDC transfer on Arbitrum, no bridging; Circle charges nothing. Our fee is cost-only (no percentage).",
                        "Our fee tracks live gas; the final quote is shown in the app before the user confirms."
                      ],
                      "quoted_at": "2026-10-09T12:00:00.000Z",
                      "expires_at": "2026-10-09T12:02:00.000Z",
                      "swap_link": "https://sendstables.com/swap?from=arbitrum&to=arbitrum&amount=5000&recipient=0x1111111111111111111111111111111111111111",
                      "executable": false,
                      "summary": "Send 5000 USDC to 0x1111111111111111111111111111111111111111 on Arbitrum (same chain, no bridging): about 4999.9 USDC arrives (at least 4999.9). …"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, a same-chain request without a recipient (RECIPIENT_REQUIRED), a Stellar recipient without a USDC trustline (NO_TRUSTLINE), or an amount too small for the route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transfers/{chain}/{hash}": {
      "get": {
        "operationId": "getTransferStatus",
        "summary": "Delivery status of a transfer",
        "description": "Status of a cross-chain USDC transfer by its source chain and source (burn) transaction hash.",
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "Source chain slug or key.",
            "schema": {
              "type": "string"
            },
            "example": "base"
          },
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "description": "Source-chain burn transaction hash.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sig",
            "in": "query",
            "required": false,
            "description": "The quote signature from the app, if known (disambiguates and reports failed registrations).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transfer status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferStatus"
                },
                "example": {
                  "object": "transfer_status",
                  "source_chain": {
                    "key": "Base",
                    "slug": "base",
                    "name": "Base",
                    "kind": "evm"
                  },
                  "source_tx": "0x5f0c…",
                  "source_explorer_url": "https://basescan.org/tx/0x5f0c…",
                  "status": "delivered",
                  "attested": true,
                  "amount_usdc": "49.75",
                  "destination_chain": {
                    "key": "Solana",
                    "slug": "solana",
                    "name": "Solana",
                    "kind": "solana"
                  },
                  "destination_tx": "4vJ9…",
                  "destination_explorer_url": "https://solscan.io/tx/4vJ9…",
                  "forward_state": "COMPLETE",
                  "bound": true,
                  "error": null,
                  "code": null,
                  "tracking_url": "https://sendstables.com/tx/Base/0x5f0c…"
                }
              }
            }
          },
          "400": {
            "description": "Invalid chain, hash or sig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "RateLimited": {
        "description": "Too many requests from this IP. Retry after 60 seconds.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message; safe to show to the user."
          },
          "code": {
            "type": "string",
            "description": "Machine-readable code. Common: INVALID_REQUEST, INVALID_RECIPIENT, RECIPIENT_REQUIRED (same-chain quote without a recipient), NO_TRUSTLINE (Stellar recipient lacks a USDC trustline), QUOTE_TOO_SMALL, ROUTE_UNAVAILABLE, DESTINATION_UNAVAILABLE (delivery to that chain isn't available yet; see listChains `destination`), RATE_LIMITED, INTERNAL. Treat unknown codes as errors."
          }
        },
        "example": {
          "error": "Unknown chain \"bsc\" for to (see /api/v1/chains)",
          "code": "INVALID_REQUEST"
        }
      },
      "ChainRef": {
        "type": "object",
        "required": [
          "key",
          "slug",
          "name",
          "kind"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Route key on this deployment, e.g. \"Base\" (or \"Base_Sepolia\" on testnet)."
          },
          "slug": {
            "type": "string",
            "description": "Network-agnostic slug to use in requests and swap links, e.g. \"base\"."
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "evm",
              "solana",
              "stellar"
            ]
          }
        }
      },
      "Chain": {
        "type": "object",
        "required": [
          "key",
          "slug",
          "name",
          "kind",
          "cctp_domain",
          "can_send_from",
          "can_send_to",
          "delivery",
          "fast",
          "gas_token"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "evm",
              "solana",
              "stellar"
            ]
          },
          "cctp_domain": {
            "type": "integer"
          },
          "can_send_from": {
            "type": "boolean"
          },
          "can_send_to": {
            "type": "boolean"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "circle_forwarding",
              "sendstables_relayer"
            ],
            "description": "Who mints on this chain as a destination."
          },
          "fast": {
            "type": "boolean",
            "description": "CCTP Fast Transfer as a source (Circle attests in seconds instead of minutes)."
          },
          "gas_token": {
            "type": "string",
            "description": "Native gas token (sendstables pays it; users never need it)."
          },
          "destination": {
            "type": "boolean",
            "const": false,
            "description": "Present (false) only when this chain can't receive cross-chain transfers yet; it still works as a source and for same-chain sends. `can_send_to` is false too."
          },
          "destination_reason": {
            "type": "string",
            "description": "Why `destination` is false. Present only with it."
          }
        }
      },
      "ChainList": {
        "type": "object",
        "required": [
          "object",
          "network",
          "data"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "network": {
            "type": "string",
            "enum": [
              "mainnet",
              "testnet"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chain"
            }
          }
        }
      },
      "QuotePreview": {
        "type": "object",
        "required": [
          "object",
          "network",
          "from",
          "to",
          "amount_usdc",
          "sendstables_fee_usdc",
          "circle_fee_usdc",
          "total_fee_usdc",
          "max_total_fee_usdc",
          "receive_estimate_usdc",
          "receive_min_usdc",
          "delivery",
          "speed",
          "recipient",
          "recipient_checked",
          "creates_recipient_usdc_account",
          "assumptions",
          "quoted_at",
          "expires_at",
          "swap_link",
          "executable",
          "summary"
        ],
        "properties": {
          "object": {
            "const": "quote_preview"
          },
          "network": {
            "type": "string",
            "enum": [
              "mainnet",
              "testnet"
            ]
          },
          "from": {
            "$ref": "#/components/schemas/ChainRef"
          },
          "to": {
            "$ref": "#/components/schemas/ChainRef"
          },
          "amount_usdc": {
            "type": "string",
            "description": "Debited from the sender, fees included."
          },
          "sendstables_fee_usdc": {
            "type": "string",
            "description": "sendstables' fee; covers all sponsored gas on both chains. sendstables' cross-chain fee is a service charge of 0.05% of the amount (minimum $0.10, no cap), plus estimated sponsored gas, wallet and relaying costs with a 30% margin. Circle fees are separate. Same-chain sends (no bridging) pay no percentage: only the transfer's estimated cost plus margin, or the minimum fee if that's higher."
          },
          "circle_fee_usdc": {
            "type": "string",
            "description": "Circle's CCTP fees (Fast Transfer and forwarding), estimated. \"0\" for a same-chain send."
          },
          "total_fee_usdc": {
            "type": "string",
            "description": "amount_usdc − receive_estimate_usdc."
          },
          "max_total_fee_usdc": {
            "type": "string",
            "description": "amount_usdc − receive_min_usdc (worst case)."
          },
          "receive_estimate_usdc": {
            "type": "string"
          },
          "receive_min_usdc": {
            "type": "string",
            "description": "Guaranteed minimum delivered."
          },
          "delivery": {
            "type": "string",
            "enum": [
              "circle_forwarding",
              "sendstables_relayer",
              "same_chain_transfer"
            ],
            "description": "Who mints on the destination, or same_chain_transfer: from = to, one USDC transfer to the recipient (no CCTP)."
          },
          "speed": {
            "type": "string",
            "enum": [
              "fast",
              "standard",
              "same_chain"
            ],
            "description": "CCTP Fast Transfer or standard attestation; same_chain: one on-chain transfer, no attestation wait."
          },
          "recipient": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipient_checked": {
            "type": "boolean",
            "description": "true if the recipient's chain-specific readiness (USDC account / trustline) was checked."
          },
          "creates_recipient_usdc_account": {
            "type": "boolean"
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quoted_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Prices are indicative after this."
          },
          "swap_link": {
            "type": "string",
            "format": "uri",
            "description": "Opens sendstables prefilled; the user reviews and confirms."
          },
          "executable": {
            "const": false
          },
          "summary": {
            "type": "string",
            "description": "One paragraph to show the user."
          }
        }
      },
      "TransferStatus": {
        "type": "object",
        "required": [
          "object",
          "source_chain",
          "source_tx",
          "status",
          "attested",
          "tracking_url"
        ],
        "properties": {
          "object": {
            "const": "transfer_status"
          },
          "source_chain": {
            "$ref": "#/components/schemas/ChainRef"
          },
          "source_tx": {
            "type": "string"
          },
          "source_explorer_url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "attested",
              "delivering",
              "awaiting_stellar_setup",
              "delivered",
              "needs_review",
              "failed",
              "unknown"
            ],
            "description": "pending: waiting for Circle's attestation. attested/delivering: being minted. delivered: done (destination_tx set). awaiting_stellar_setup: paid and burned, waiting for the recipient's one-time Stellar setup (USDC trustline); resumes by itself, funds safe at Circle. needs_review: a human is looking (funds are safe). failed: the burn wasn't accepted for that quote. unknown: not a sendstables transfer we know."
          },
          "attested": {
            "type": "boolean"
          },
          "amount_usdc": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination_chain": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChainRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "destination_tx": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination_explorer_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "forward_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "bound": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "tracking_url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "x-swap-link": {
    "format": "https://sendstables.com/swap?from=<slug>&to=<slug>&amount=<usdc>[&recipient=<address>][&ref=<tag>]",
    "amount": {
      "min": 0.01,
      "max": 1000000,
      "decimals": 6
    },
    "executes_automatically": false
  }
}