Companies
List and read companies the API key can access.
Endpoints
GET/api/v1/companies: List companies the API key can access.POST/api/v1/companies: Create a company and set it up for bookkeeping.
GET /api/v1/companies {#get-companies-list}
companies.list · scope companies:read
List companies the API key can access.
Returns every non-archived company the API key user is a member of, together with their role. Use the returned id as {companyId} in subsequent endpoints.
Use when: You need to discover which company IDs an API key has access to before calling company-scoped endpoints.
Don't use for: Fetching a single company you already know the id of: use GET /api/v1/companies/{companyId} for that.
Pitfalls
- Multi-company keys (e.g. consultants) will see >1 result. Always pass the correct companyId in subsequent paths.
- Archived companies are excluded; if a company disappears the user has been removed from it or it was archived.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no
Example response
{
"data": [
{
"id": "8fd5b1f4-…",
"name": "Acme AB",
"org_number": "556677-8899",
"entity_type": "aktiebolag",
"role": "owner",
"created_at": "2025-01-04T08:00:00Z"
}
],
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12",
"next_cursor": null
}
}
POST /api/v1/companies {#post-companies-create}
companies.create · scope companies:write
Create a company and set it up for bookkeeping.
Creates a new company owned by the API key user (or attached to one of their teams) and sets it up in one call: owner membership, BAS chart of accounts for the company form, compliance settings, the first fiscal period and the automatic tax deadlines. A 30-day trial with every paid capability starts immediately. Intended for partner platforms provisioning client companies (byrå/vertical SaaS) and for agents onboarding a user.
Use when: A platform or agent needs to provision a company that does not exist in Accounted yet. The caller becomes its owner; invite the end customer afterwards.
Don't use for: Companies that already exist (list them with GET /api/v1/companies), or changing settings on an existing company (PATCH /api/v1/companies/{companyId}/settings).
Pitfalls
- A VAT-registered company MUST send moms_period (monthly / quarterly / yearly); the request is refused otherwise, because a missing period silently produces zero VAT deadlines.
- Bookkeeping duty under BFL starts when the company exists with a fiscal period: do not create companies to try things out. Use a test-mode key (dry run) for that.
- Enskild firma always runs on the calendar year; fiscal_year_start_month is ignored for it.
- first_fiscal_year is only for a company in its first year (BFL 3 kap.: up to 18 months). Omit it for an established company.
- Not idempotent, and Idempotency-Key is not honoured on this company-less route: a retry after a network failure creates a second company. List GET /api/v1/companies before retrying.
- org_number is required for a VAT-registered company (the invoice momsregistreringsnummer derives from it), and f_skatt must be stated explicitly: F-skatt approval is never assumed.
- accounting_method may be omitted: it then defaults by form (aktiebolag accrual, enskild firma cash) and the response shows the resolved value. The cash default is only legal when turnover normally stays under 3 MSEK (BFL 4 kap 4 §): send accrual explicitly for a larger enskild firma.
Risk: medium · Idempotent: no · Reversible: no · Dry-run supported: yes
Example request
{
"name": "Acme AB",
"entity_type": "aktiebolag",
"org_number": "5566778899",
"vat_registered": true,
"moms_period": "quarterly",
"accounting_method": "accrual",
"f_skatt": true
}
Example response
{
"data": {
"id": "8fd5b1f4-…",
"name": "Acme AB",
"entity_type": "aktiebolag",
"org_number": "5566778899",
"vat_registered": true,
"moms_period": "quarterly",
"accounting_method": "accrual",
"fiscal_period": {
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"name": "Räkenskapsår 2026"
},
"team_id": null
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}