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

# Companies

> List and create companies in your organization. Use a returned ID as companyId when creating or updating a room.

## Endpoints

| Method | Path                | Description      |
| ------ | ------------------- | ---------------- |
| `GET`  | `/api/v2/companies` | List companies   |
| `POST` | `/api/v2/companies` | Create a company |

***

## List companies

`GET /api/v2/companies`

### Query parameters

<ParamField query="keyword" type="string">
  Search by company name or domain (e.g. `"Acme"` or `"acme.com"`).
</ParamField>

<ParamField query="page" type="number">
  Page number (default: 1).
</ParamField>

<ParamField query="limit" type="number">
  Results per page (default: 10).
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.flowla.com/api/v2/companies?keyword=acme&page=1&limit=20" \
    -H "x-flowla-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.flowla.com/api/v2/companies",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      params={"keyword": "acme", "page": 1, "limit": 20},
  )
  print(response.json())
  ```

  ```js JavaScript theme={null}
  const res = await fetch(
    "https://api.flowla.com/api/v2/companies?keyword=acme&page=1&limit=20",
    { headers: { "x-flowla-api-key": "YOUR_API_KEY" } }
  );
  const data = await res.json();
  ```
</CodeGroup>

### Response

<ResponseField name="results" type="array">
  Array of company objects.

  <Expandable title="Company object fields">
    <ResponseField name="id" type="string">
      Company identifier. Use this as `companyId` when creating or updating a room.
    </ResponseField>

    <ResponseField name="name" type="string">
      Company display name.
    </ResponseField>

    <ResponseField name="domain" type="string">
      Company domain (e.g. `acme.com`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="totalRecords" type="number">Total matching companies.</ResponseField>
<ResponseField name="totalPages" type="number">Total pages at the current limit.</ResponseField>

```json Response 200 theme={null}
{
  "results": [
    { "id": "cmp_01ab2", "name": "Acme Corp", "domain": "acme.com" }
  ],
  "totalRecords": 1,
  "totalPages": 1
}
```

***

## Create a company

`POST /api/v2/companies`

<ParamField body="domain" type="string" required>
  Company domain (e.g. `acme.com`). Also used as `name` when `name` is omitted.
</ParamField>

<ParamField body="name" type="string">
  Company display name. Defaults to `domain` when not provided.
</ParamField>

<ParamField body="website" type="string">
  Full website URL (e.g. `https://acme.com`).
</ParamField>

```json Example theme={null}
{ "domain": "acme.com", "name": "Acme Corp" }
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.flowla.com/api/v2/companies \
    -H "x-flowla-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "domain": "acme.com", "name": "Acme Corp" }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.flowla.com/api/v2/companies",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      json={"domain": "acme.com", "name": "Acme Corp"},
  )
  print(response.json())
  ```

  ```js JavaScript theme={null}
  const res = await fetch("https://api.flowla.com/api/v2/companies", {
    method: "POST",
    headers: {
      "x-flowla-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ domain: "acme.com", name: "Acme Corp" }),
  });
  const company = await res.json();
  ```
</CodeGroup>

### Response

```json Response 201 theme={null}
{
  "id": "cmp_01ab2",
  "name": "Acme Corp",
  "domain": "acme.com",
  "website": null,
  "createdAt": "2026-06-01T10:00:00.000Z"
}
```
