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

# Companies and teams

> How companies, members and roles work, and how to manage a team.

A **company** is a brand or client workspace with its own social accounts, posts, media, brand style and team. A user can belong to many companies, with a different **role** in each.

## Roles

An API key acts with its user's role in each company. Anything the role can't do gets `403`.

| Role | Can do |
| - | - |
| `owner` | The account that pays. Everything. |
| `admin` | Everything except owner-only actions, such as setting limits or making owners. |
| `user` | Create and edit content, media, AI generations, social accounts and settings. Can't delete the company or invite people. |
| `client` | Read everything, but can't create or change content. |

> [accordion] Who can manage the team
>
> | Action | Who |
> | - | - |
> | Read the company and its team | Every role |
> | Update the company's details | Every role but `client` |
> | Delete the company | `owner`, `admin` |
> | Invite people | `owner` (any role), `admin` (any role but `owner`) |
> | Change a member's role | `owner` (anyone), `admin` (admins, users, clients), `user` (users, clients) |
> | Remove a member | `owner` and `admin`, for their own role or lower. Anyone may leave. |
> | Set member and company limits | `owner` |
>
> Nobody can change or remove the company owner's role.

## Work with companies

```bash cURL theme={null}
curl "https://api.followr.ai/api/companies?include=role" \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json"
```

Each company carries `role` (the key's user's role in it) only with `include=role`. To see who you are and your companies:

```bash cURL theme={null}
curl "https://api.followr.ai/api/users/me?include=companies" \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json"
```

Create a company with `POST /companies`: the key's user becomes its owner, and it uses that user's plan. Each company beyond the first needs room in the plan, or you get `402` with `entity: companies`. Update it with `PUT /companies/{id}`.

## Manage the team

Team endpoints need team management in the key's plan. Otherwise they answer `402` with `entity: api_user_management` (requests about your own user still work).

### 1. Invite a person

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/users \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"email": "sam@northside.example", "company_id": 1287, "role": "user", "name": "Sam Lee"}'
```

The person gets an email with a sign-in link, and the role applies at once. You get `201` for a new Followr account, `200` for an existing one. Each new person takes a plan seat: with none left, `402` with `entity: users`.

### 2. Change a role

```bash cURL theme={null}
curl --request PUT https://api.followr.ai/api/companies/1287/users/5530 \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"role": "admin"}'
```

### 3. Remove a member

```bash cURL theme={null}
curl --request DELETE "https://api.followr.ai/api/users/5530?company_id=1287" \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json"
```

This removes access to this company only. Their account and work stay.

> [!WARNING]
>
> `DELETE /users/me` **without** `company_id` closes the key's own account: the plan is cancelled at the end of the paid period, its companies become unavailable and all its keys stop working. Always send `company_id` to leave one company.

## Limit usage per company or member

Owners can cap the AI words, media credits and members of a company, or of one member in it:

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/subscriptionLimits \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"company_id": 1288, "words_amount": 200000, "images_amount": 500}'
```

Check the result with `GET /subscriptions/balance?company_id=1288`. See [Plans and usage](https://docs.followr.ai/api/plans-and-usage.md).

## Brand style

A company's **brand style** (colors, look, logo use, reference pictures) guides its AI pictures. Read or change it with `GET` or `PUT /companies/{id}/brand-look`.

[`POST /companies/{id}/brand-look/draft`](https://docs.followr.ai/api-reference/brand-style/draft-the-brand-style) proposes one from the media library and website (no AI credits, 6 per company per day). Poll `GET` on the same path until `status` is `ready` or `failed`, then apply it with `PUT /companies/{id}/brand-look`: a draft saves nothing.

## Webhooks

Set [webhooks](https://docs.followr.ai/webhooks/overview.md) per company, in the app under **Company settings > Webhooks** or with `webhook_posts_url` in `PUT /companies/{id}`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.