---
title: "Create a client company"
method: POST
path: "/agencies/{agencyId}/companies"
tags: ["agency-companies"]
---

# Create a client company

`POST /agencies/{agencyId}/companies`

## Request

- Base URL: `https://api.bokio.se/v1`
- URL: `https://api.bokio.se/v1/agencies/{agencyId}/companies`
- Auth: HTTP bearer

Create a brand-new Bokio company and connect it to the agency as a client.

The company is created on a free trial. The organization number must be a valid
organization number.

**Scope:** `agency-companies:write`

## Request body

- AgencyCompanyWriteModel
  - `name` string, required: Name of the company
  - `ownerEmail` string, email, required: Email of the company owner. Must belong to an existing user that is a member of the agency. This user becomes the owner of the created company so they can access it.
  - `organizationNumber` string, required: Organization number of the company
  - `vatNumber` string, nullable: VAT number of the company
  - `companyType` 'proprietorship' | 'limitedCompany' | 'limitedPartnership' | 'partnership' | 'cooperative' | 'nonProfitAssociation' | 'communityAssociation' | 'religiousCommunity', required: Company type of the company
  - `accountingMethod` 'cash' | 'accrual', required: The accounting method used by the company.
  - `vatSetting` 'yearly' | 'quarterly' | 'monthly' | 'notRegisteredForVat', required: The VAT reporting period of the company.
  - `address` Address
    - `line1` string
    - `line2` string, nullable
    - `city` string
    - `postalCode` string
    - `country` string, country: ISO 3166-1 alpha-2 country code
  - `fiscalYearStart` string: The start of the company's fiscal year as a month and day in `MM-DD` format. Defaults to `01-01` when omitted.

## Response `200`

Client company created

- AgencyCompanyGetModel
  - `id` string, uuid, required: Unique identifier for the company
  - `name` string, required: Name of the company
  - `organizationNumber` string, required: Organization number of the company
  - `vatNumber` string, nullable: VAT number of the company
  - `companyType` 'proprietorship' | 'limitedCompany' | 'limitedPartnership' | 'partnership' | 'cooperative' | 'nonProfitAssociation' | 'communityAssociation' | 'religiousCommunity', required: Company type of the company
  - `address` Address
    - `line1` string
    - `line2` string, nullable
    - `city` string
    - `postalCode` string
    - `country` string, country: ISO 3166-1 alpha-2 country code

## Other responses

- `400`: Missing or invalid information
- `404`: Agency not found

---

[API](https://skmtc.dev/bokio/apis/agency-api.md) - [All operations](https://skmtc.dev/bokio/apis/agency-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bokio/apis/agency-api/revisions/2ec5b299f1d5?raw)
