---
title: "Create a company"
description: "Companies and keys API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a company

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/companies</code>
</div>
</div>

Creates a company for one of your customers, in the key's environment. Call it when a customer signs up. Requires a workspace key.

### Safe retries

Send `reference`, your own id for that customer, to make retries safe.

- The same reference, name and country again returns `200` with the existing company.
- The same reference with a different name or country returns `409 company_reference_conflict` and changes nothing.
- Without a reference, every call creates a new company.

`country` defaults to `DE`. You can use the new id right away in the `Certinvo-Company` header.

The new company opens in the console without the setup questions: your staff can switch to it right away.

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | A retry. The body is the company this reference already names. |
| `201` | The company was created. |
| `400` | The body was refused (`invalid_company`, the message names the field), or a company was named in the request (`company_not_expected`). Nothing was written. |
| `401` | No usable credential was sent (`invalid_credentials`), or the credential is not a workspace key (`workspace_key_required`). |
| `409` | The reference already names a company with a different name or country (`company_reference_conflict`). Nothing was changed. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/workspaces/create-a-company/index.mdx
