# FreeAgent API for Accounting Agents

DevFeed: [FreeAgent API for Accounting Agents](<https://devfeed.tech/articles/freeagent-api-for-accounting-agents-98751.md>)

Original publisher: [Read original article](<https://www.swytchcode.com/content/freeagent-api-accounting-agents>)

Author: Chaitrali Kakde

Published: 2026-10-24T10:33:19.077565Z

Content type: tutorial

Language: en

Sources: [Swytchcode](<https://devfeed.tech/sources/swytchcode.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [human in the loop agent](<https://devfeed.tech/topics/human-in-the-loop-agent.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>), [Claude](<https://devfeed.tech/topics/claude.md>)

Tags: [000](<https://devfeed.tech/tags/000.md>), [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [account](<https://devfeed.tech/tags/account.md>), [accounting](<https://devfeed.tech/tags/accounting.md>), [adjustment](<https://devfeed.tech/tags/adjustment.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-api](<https://devfeed.tech/tags/ai-api.md>), [all](<https://devfeed.tech/tags/all.md>), [api](<https://devfeed.tech/tags/api.md>), [integrations](<https://devfeed.tech/tags/integrations.md>), [lets](<https://devfeed.tech/tags/lets.md>), [locks](<https://devfeed.tech/tags/locks.md>), [period](<https://devfeed.tech/tags/period.md>), [post](<https://devfeed.tech/tags/post.md>), [write](<https://devfeed.tech/tags/write.md>)

## AI overview

FreeAgent agents should check accounting period locks with `GET /v2/account_locks` before any dated write. For a locked period, the source recommends stopping for human review or reclassifying into an open period only when firm policy permits, while making the choice visible; agents should not reopen locks. It also describes OAuth 2.0, a sandbox, a required `User-Agent`, and limits of 120 requests per minute and 3,600 per hour per token, with `Retry-After` on 429 responses and `X-RateLimit-Test` for testing backoff. Suggested safeguards include narrowly allowlisted methods, approval gates for material invoices and backdated entries, stable idempotency keys plus a search before retrying, and an audit trail. The excerpt favors read-only workflows for invoice follow-up, pre-close review, and cash briefings; it says small, routine expenses may be posted with safeguards, while material or judgment-heavy items should be prepared for a person to post. It also recommends separate client connections.

## Source excerpt

FreeAgent lets you read accounting period locks before you write. An agent that skips that check will eventually post an entry into a period someone has already filed.