External API

Last updated: October 22, 2026

The External API lets you add transactions to your Budget AI account from outside the app: Apple Shortcuts, scripts, bots, home automation or any tool that can send an HTTP request. Transactions arrive in the app automatically and are marked for review.

1. Get an API key

2. Send a request

The endpoint URL is shown on the API screen in the app, for example https://external-api-budgetai.appwrite.network. All requests are POST with a JSON body to the path /add-transaction. The same screen has a request example with your own categories and account and a Request builder that makes a body from the fields you pick.

Pass the key in the body as apiKey or in the header Authorization: Bearer <key>.

curl -X POST "https://<endpoint from the app>/add-transaction" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer vf_your_key" \
  -d '{
    "mode": "manual",
    "transaction": {
      "type": "expense",
      "amount": 4.5,
      "currency": "USD",
      "category": "Food",
      "subCategory": "Coffee",
      "account": "Card",
      "note": "Latte"
    }
  }'

Apple Shortcuts

Use the Get Contents of URL action: set the URL to the endpoint with /add-transaction, Method to POST, add the header Authorization with the value Bearer vf_your_key, and pass the fields below as a JSON request body.

3. Manual mode

"mode": "manual" (the default). You pass the transaction fields yourself. Manual mode doesn't use AI tokens.

FieldRequiredDescription
amountyesNumber, not zero. The sign is set by type: expenses are saved as negative, incomes as positive.
currencyyes3-letter code, e.g. USD, EUR, RUB.
typeyesexpense or income.
dateTimenoISO 8601, e.g. 2026-10-13T09:30:00Z or 2026-10-13T12:30:00+03:00. Without it, the time of the request.
notenoUp to 500 characters.
category, subCategorynoCategory and subcategory names exactly as in the app (case doesn't matter). A subcategory alone is enough: its category is found by it. An unknown name: the transaction is saved without a category.
accountnoAccount name exactly as in the app (case doesn't matter). Without it, or with an unknown name, the account selected in the app is used.

Where the result goes: target

Response

{
  "success": true,
  "transactionsCount": 1,
  "tokensUsed": 0,
  "tokensRemaining": 999850,
  "transactions": [ ... ]   // only for target "return" and "syncreturn"
}

4. AI modes coming soon

These modes are not available yet; requests with them get 501 AI_MODE_DISABLED. When they are released:

5. Limits

6. Errors

Errors come as {"error": "...", "code": "..."}.

StatusCodeMeaning
400INVALID_TRANSACTION, INVALID_MODE, INVALID_TARGETThe request body is invalid; error says what is wrong.
401INVALID_API_KEYThe key is missing or unknown.
401API_KEY_REVOKEDThe key was revoked or replaced by a new one.
401API_KEY_EXPIREDThe key has expired; create a new one in the app.
401SUBSCRIPTION_EXPIREDThe subscription has ended; the key is revoked.
402INSUFFICIENT_TOKENSAI modes: the token balance is empty.
409CONTEXT_MISSINGAI modes: categories are not synced yet. Open the app.
429RATE_LIMIT_EXCEEDED, DAILY_REQUESTS_EXCEEDEDToo many requests per minute or per day.
429PENDING_QUEUE_FULLToo many transactions are waiting for sync.
429DAILY_LIMIT_EXCEEDEDAI modes: the daily token limit is reached; resets at 00:00 UTC.
501AI_MODE_DISABLED, ENCRYPTED_NOT_SUPPORTEDThe mode is not available yet.
5xxINTERNAL_ERROR, AI_PROCESSING_ERRORServer error; try again later.

7. Terms

The API is a tool for advanced users, for your own account and personal use. You choose which tools and services get your key and what they send, and you are responsible for the requests made with it and their results: we don't check, set up or support third-party tools. Don't share your key or embed it in apps distributed to others. Check transactions added through the API like any other entries. Use of the API is subject to the Terms of Service (section 6.8) and the Privacy Policy. Questions: budgetai@agentmail.to.