---
title: "Create Bexio Account"
method: POST
path: "/companies/{company_id}/bexio-accounts"
tags: ["companies"]
---

# Create Bexio Account

`POST /companies/{company_id}/bexio-accounts`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/companies/{company_id}/bexio-accounts`
- Auth: none declared

Add a bexio account to a company (accountant/owner). PAT encrypted at rest, never
returned.

For a company user (not a platform admin) ``base_url`` must be https on a public address
(422 ``invalid.integrationHost``).

## Path parameters

- `company_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- BexioAccountCreate: ``POST /companies/<id>/bexio-accounts`` body (admin). ``bexio_api_token`` is the read-scoped Personal Access Token; it is encrypted at rest and never returned. The encrypted column is Text, so the raw token has no tight upper bound here.
  - `label` string, required
  - `bexio_api_token` string, required
  - `base_url` string
  - `enabled` boolean
  - `poll_batch_cap` integer, nullable

## Response `201`

Successful Response

- BexioAccountResponse: ``GET/POST/PATCH /bexio-accounts/...`` → ``{"bexio_account": ...}``.
  - `bexio_account` BexioAccountOut, required: Serialized bexio account (no secret); includes poll-health fields.
    - `id` string, required
    - `company_id` string, required
    - `label` string, required
    - `enabled` boolean, required
    - `poll_batch_cap` integer, nullable
    - `base_url` string, required
    - `last_sync_at` string, date-time, nullable
    - `last_sync_error` string, nullable
    - `rate_limited_until` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
