canonical: https://jentic.com/apis/bokio.se/bokio

# Bokio Se Bokio API

Jentic publishes the only available OpenAPI specification for Bokio API, keeping it validated and agent-ready. Bokio is a Swedish cloud accounting platform used by small businesses and sole traders to keep books, invoice customers, and reconcile bank activity. The API exposes journal entries, customers, invoices, items, uploads (receipts), the chart of accounts, and connection management. Use it to post journal entries, issue and publish invoices, attach receipt uploads, and reconcile invoice payments without leaving your own application.

## For AI agents

Post journal entries, create and publish invoices, manage customers and items, and upload receipts in a Bokio accounting workspace.

## Scope

Does not handle payroll, tax filing, or bank account aggregation - use for Bokio bookkeeping, invoicing, and journal entry workflows only.

## Capabilities

- Post a journal entry to the Bokio ledger and reverse it if a correction is needed
- Create and publish a customer invoice, then record payments and settlements against it
- Upload a receipt or supporting document and attach it to bookkeeping records
- Manage the customer master list with create, update, and delete operations
- Maintain the product and service item catalogue used in invoicing
- Inspect the chart of accounts and active third-party connections for a company

## Use cases

### Automated Invoicing for SaaS Subscriptions

Generate Bokio invoices automatically when a Swedish customer is billed in your application, attach the line items, and publish so the invoice is sent and booked. The /invoices endpoints create, update, and publish invoices, and /invoices/{invoiceId}/payments records settlement when the customer pays. Removes the manual data entry that small Swedish businesses typically do at month end.

Example prompt: POST /invoices for customer 9241 with two line items totalling 4500 SEK, then POST /invoices/{invoiceId}/publish

### Receipt Upload and Attachment

Capture supplier receipts from email or a mobile app and push them into Bokio so they are stored alongside the journal entry that records the expense. The /uploads endpoint accepts the file, and the resulting upload ID can be referenced when posting the journal entry. Helps Swedish bookkeepers comply with the digital archive requirement.

Example prompt: POST /uploads with the receipt PDF, then POST /journal-entries referencing the returned upload ID

### Bank Reconciliation Workflow

Pull invoices, post matching payments, and create settlements as bank transactions arrive so the ledger stays current. Combine /invoices, /invoices/{invoiceId}/payments, and /invoices/{invoiceId}/settlements to close out receivables. Useful for finance teams that want continuous reconciliation rather than a month-end batch.

Example prompt: POST /invoices/{invoiceId}/payments with amount 1200 SEK and date 2026-06-01 for invoice 8821

### AI Agent Bookkeeping Assistant

An AI agent uses Jentic to discover Bokio operations from natural-language requests, creates invoices, posts journal entries, and uploads receipts on behalf of a Swedish small business. Credentials are isolated in your Jentic One instance so the OAuth refresh token never reaches the prompt. The agent runs the search-load-execute cycle for each accounting action.

Example prompt: Search Jentic for 'create an invoice in Bokio', load the operation, and execute it with the customer ID and line items

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /invoices | Create an invoice |
| POST | /invoices/{invoiceId}/publish | Publish an invoice so it is issued and booked |
| POST | /invoices/{invoiceId}/payments | Record a payment against an invoice |
| POST | /journal-entries | Post a journal entry to the ledger |
| POST | /journal-entries/{journalId}/reverse | Reverse a posted journal entry |
| POST | /uploads | Add a receipt or supporting document upload |
| GET | /chart-of-accounts | Read the company chart of accounts |

## Key resources

- **Customers** — Create, list, update, and delete customer records used for invoicing
- **Invoices** — Create, publish, and update invoices including line items, payments, and settlements
- **Journal Entries** — Post and reverse double-entry journal lines into the Bokio ledger
- **Uploads** — Add supporting documents and receipts that can be attached to entries
- **Items** — Manage the product and service catalogue used on invoices
- **Chart of Accounts** — Inspect the configured accounts for the connected company
- **Connections** — List and remove third-party application connections

## Why Jentic

- **Setup:** Wiring Bokio by hand means running its OAuth2 flow, refreshing bearer tokens, and mapping invoice and journal-entry writes yourself. Through Jentic you install once, import Bokio from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Bokio puts the invoice and journal ids in the URL path (/invoices/{invoiceId}/publish, /journal-entries/{journalId}/reverse), so a rule can pin your agent to acting on a given invoice or entry: it can publish an invoice or read the chart of accounts and nothing else. You choose the operations it may call, so reversing a journal entry is not included unless you add it.
- **Credential handling:** Your Bokio OAuth refresh token is stored once, encrypted, by your own Jentic One instance, which mints short-lived bearer tokens at execution time. The refresh token never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an invoice in Bokio' or 'post a journal entry', and Jentic returns the matching Bokio operation with its input schema so the agent calls the right endpoint without browsing the Bokio docs.

## Related APIs

- **BoldSign API** — Send Bokio-generated invoices for e-signature before publishing.
- **Boleto Cloud API** — Boleto handles Brazilian payment slips while Bokio handles Swedish accounting.
- **BookingSync API** — Sync rental booking revenue from BookingSync into Bokio invoices and journal entries.

## FAQ

### Why is there no official OpenAPI spec for Bokio API?

Bokio does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Bokio API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Bokio API use?

Bokio supports OAuth 2.0 authorization code flow at /authorization/authorize and /authorization/token, plus HTTP Bearer for the resulting access token. Through Jentic the refresh token lives in the encrypted vault and the agent only ever sees a scoped, short-lived bearer.

### Can I create and publish invoices with the Bokio API?

Yes. POST /invoices to create the invoice, POST /invoices/{invoiceId}/line-items to add lines, then POST /invoices/{invoiceId}/publish to issue it. You can also record payments via POST /invoices/{invoiceId}/payments.

### How do I post a journal entry through Jentic?

Search Jentic for 'post a journal entry in Bokio', load the POST /journal-entries operation schema, then execute it with the entry lines. If you need to reverse it later, use POST /journal-entries/{journalId}/reverse.

### What are the rate limits for the Bokio API?

The OpenAPI spec does not declare formal rate limits. Bokio's documentation at docs.bokio.se outlines fair-use guidance - back off on HTTP 429 responses and avoid tight polling loops on /invoices and /journal-entries.

### Can I attach receipts to bookkeeping entries?

Yes. POST /uploads with the receipt file to get an upload ID, then reference that ID when creating the related journal entry. The uploaded file can be retrieved later via GET /uploads/{uploadId}/download.

### Can I limit what my agent is allowed to do with the Bokio API?

Yes. Because you host Jentic One yourself, your own rules decide which Bokio operations and credentials the agent may use, so you can grant read-only access to the chart of accounts while withholding writes. Since Bokio puts the invoice and journal IDs in the URL path, such as /invoices/{invoiceId}/publish and /journal-entries/{journalId}/reverse, a rule can pin the agent to acting on a specific invoice or entry. Reversing a journal entry through POST /journal-entries/{journalId}/reverse stays off limits unless you explicitly add it to the allowed set.
