# Create an organization

> Create an organization from your Coritan account, choose its slug and billing mode, and open its dashboard.

Source: https://www.coritan.com/docs/organizations/create-an-organization/

Create an organization when you want to sell Coritan products under your own brand. The account that creates it becomes its owner, and the organization opens in the dashboard ready for products, customers and members.

## Before you begin

- Sign in to the Coritan account that should own the organization. The resources behind the products you link to Coritan's run on this account, and only this account can delete the organization later.
- Choose a slug. It appears in every Organization API path and cannot be changed after the organization is created.
- Decide how your customers will pay. [How organizations work](/docs/organizations/how-organizations-work/#how-money-moves) compares the three billing modes, and you can change the mode later in [Settings](/docs/organizations/settings/).

## Create it in the dashboard

1. Go to **Organizations** in the [dashboard](https://www.coritan.com/dashboard/organizations) and select **New organization**.
2. Enter a **Name** of 2–255 characters. Customers see it on your storefront.
3. Check the **Slug**. The dashboard fills it in from the name until you edit it. It takes 2–100 lowercase letters, numbers and hyphens, and starts and ends with a letter or a number, such as `acme`.
4. Choose a **Billing mode**: **Platform merchant of record**, **Own gateway** or **Hybrid**.
5. Select **Create organization**.

## Result

The dashboard confirms that the organization was created and opens its **Overview** tab. You are its owner. The organization is `active`, and Coritan has set its tier, platform fee and limits, which the list of organizations and the organization's header show.

Next, set it up:

1. Add your name, logo, colours, storefront domain and support details in [Settings](/docs/organizations/settings/).
2. [Set up products and pricing](/docs/organizations/products-and-pricing/).
3. [Invite members](/docs/organizations/members-and-roles/) to help you run it.

## Troubleshooting

`Slug already taken`
: Another organization uses that slug. Choose a different one.

`Enter a slug of at least two characters: lowercase letters, digits and hyphens.`
: The slug is shorter than two characters once the dashboard has removed what a slug cannot hold. Type a longer one.

`422` from the API
: The slug breaks the pattern, for example by ending in a hyphen, or the name is shorter than two characters.

## Related

- [How organizations work](/docs/organizations/how-organizations-work/)
- [Change organization settings](/docs/organizations/settings/)
- [Delete an organization](/docs/organizations/delete-an-organization/)

## With the API

Create the organization with your Coritan access token. The body takes `name`, `slug` and, optionally, `billing_mode` (`platform_mor` when you leave it out, or `own_gateway` or `hybrid`).

```bash
curl -X POST https://api.coritan.com/api/v1/orgs \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Hosting", "slug": "acme", "billing_mode": "platform_mor"}'
```

The answer is `201` with the organization:

```json
{
  "id": 42,
  "slug": "acme",
  "name": "Acme Hosting",
  "tier": "starter",
  "status": "active",
  "billing_mode": "platform_mor",
  "platform_fee_percent": "10.00",
  "max_customers": 100,
  "max_services": 500,
  "max_custom_products": 50,
  "my_role": "owner"
}
```

The values of `tier`, `platform_fee_percent` and the `max_` limits are the ones Coritan set for your organization. Read the organization again at any time with `GET /api/v1/orgs/acme`, and list every organization you belong to with `GET /api/v1/orgs`, newest first, each with your role in `my_role`.

## API

- `POST /api/v1/orgs`: Create organization (https://www.coritan.com/docs/api/reference/organizations/organizations-members/orgs/#op-post-api-v1-orgs)
- `GET /api/v1/orgs/{org_slug}`: Get organization (https://www.coritan.com/docs/api/reference/organizations/organizations-members/#op-get-api-v1-orgs-org-slug)
