Using the API from AI agents

Give an AI agent or code generator what it needs to call mybanx safely.

This page is for developers who let an AI agent call the mybanx API, or who generate a client from its specification. To connect Claude or ChatGPT to your own accounts without writing code, use the mybanx MCP server instead.

Machine-readable sources

SourceURL
OpenAPI specification (v2)https://api.mybanx.io/swagger/v2/swagger.json
OpenAPI specification (v1, legacy)https://api.mybanx.io/swagger/v1/swagger.json
These guides, as Markdownhttps://apidocs.mybanx.io/llms.txt lists every page; add .md to any page URL.

The specification describes every endpoint, field, required value and error, and gives each operation a stable operationId (ListBankAccounts, ListTransactions, CreatePayment...). It is the best input for an agent's tool definitions or for a client generator.

Recommended agent workflow

  1. Authenticate (POST /v2/auth) once, keep the bearer, and refresh it with RefreshToken before validUntil.
  2. ListBankAccounts (or ListIndirectCompanies then ListIndirectBankAccounts) to resolve the account the user means: match on IBAN (account), name or bankName.
  3. Read with GetLatestBalance, ListTransactions (page by page, newest first) or ExportTransactions.
  4. Treat 204 as "nothing found", not as a failure.

Safety rules for agents

  • Keys stay server-side. The ApplicationKey, ClientKey and tokens must never appear in prompts, logs or tool outputs shown to users.
  • Read-only by default. Give an agent an application key without the payment right unless it really needs to initiate payments.
  • Payments always need a human. CreatePayment, CreateBulkPayment and CreateRequestToPay only prepare an operation and return a url. Nothing is paid until a person approves it with their bank. The agent should show the payment details and the url to the user, never claim that money was sent.
  • Always send Idempotency-Key on POST, generated once per user intent and reused on retries, so an agent's retry loop never duplicates a payment.
  • Do not loop on 401. After one token refresh, a 401 means missing rights or an inaccessible account: report it to the user.
  • Respect the rate limit (240 requests per minute per IP) and prefer sequence-based syncing to re-reading history. See Errors, limits and retries.

Field conventions worth telling an agent

  • Amounts are decimals in the account's currency. Transaction amounts are negative for money leaving the account.
  • balanceType and exportDateType are numbers: see Balance types and Export formats.
  • Transaction sequence decreases over time: a lower value is a newer transaction.
  • Dates are UTC.

Did this page help you?