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

# Create a companies

> Create a companies

### Request body

`CreateCompanyRequest`

<ParamField body="email" type="string,null" />

<ParamField body="name" type="string" required />

<ParamField body="payment_terms_days" type="integer,null (int32)" />

<ParamField body="phone" type="string,null" />

<ParamField body="reference" type="string,null" />

### Responses

<ResponseField name="201" type="CompanyResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/companies' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "email": null,
    "name": "string",
    "payment_terms_days": null,
    "phone": null,
    "reference": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "created_at": "string",
    "currency": "string",
    "email": null,
    "id": "string",
    "name": "string",
    "payment_terms_days": null,
    "reference": null,
    "status": "string"
  }
  ```
</ResponseExample>
