# Managed Organizational Units

A Managed Organizational Unit is an Organizational Unit that your application
creates and manages for one of your customers. Cronofy holds its members,
their calendars, Selection Rules, Templates, and Scheduling Controls, and your
application runs scheduling for it with
[Scheduling Requests](https://docs.cronofy.com/developers/managed-scheduling/scheduling-requests/index.md).

The Sandbox you set up in
[Getting Started](https://docs.cronofy.com/developers/getting-started/index.md) is a Managed
Organizational Unit. In production, your application provisions one for each
of your customers.

> **INFO:** Managed Organizational Units are for building scheduling into software you
sell to other companies.

If you're using Cronofy within your own company, use an
[Internal Application](https://docs.cronofy.com/api-reference/application-management/internal-applications/index.md)
linked to your own Organizational Unit instead. Internal Applications can't
provision Managed Organizational Units.

## Provisioning
Your application provisions a Managed Organizational Unit with a single call,
passing your own identifier for the customer:

```http
POST /v1/organizational_units HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {CLIENT_SECRET}
Content-Type: application/json; charset=utf-8

{
  "organizational_unit_id": "customer-123",
  "name": "Hill Valley Futures"
}
```

The call is safe to repeat. If your application has already provisioned an
Organizational Unit with that identifier, Cronofy updates it rather than
creating another.

The response includes an access token and refresh token for the
Organizational Unit with the `organizational_unit_scheduling` scope. In effect,
it's the same as the customer authorizing your application with
[Organization Connect](https://docs.cronofy.com/developers/temporal-grid/connectivity/organization-connect/index.md),
without them going through an authorization flow. Use the access token to
create Scheduling Requests for the customer's members, and put the same
`organizational_unit_id` in the
[Embed Token](https://docs.cronofy.com/api-reference/authorization/embed-authentication/index.md)
to embed the Scheduler for them.

Pass a `callback_url` to receive webhooks for the Organizational Unit, such
as those for
[Scheduling Requests](https://docs.cronofy.com/api-reference/managed-scheduling/scheduling-requests/webhooks/index.md).

See [Provision a Managed Organizational Unit](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/provision/index.md)
for every option.

## Members
Members are the people your customer schedules for, such as interviewers or
sales reps. As people join and leave the customer's team,
[add members](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/add-member/index.md) or
[remove members](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/remove-member/index.md) to keep the
Organizational Unit in step with your application.

How a person you add becomes a member depends on how the customer connects
their calendars:

- **Through a service account** their administrator authorizes once, as with
[Enterprise Connect](https://docs.cronofy.com/developers/temporal-grid/connectivity/enterprise-connect/index.md), people
you add become members automatically.

- **Each for themselves**, as with
[Individual Connect](https://docs.cronofy.com/developers/temporal-grid/connectivity/individual-connect/index.md), send each
person the onboarding link returned when you add them. They become a member
once they've connected their calendars.

Either way, your application works with the Organizational Unit rather than with
each calendar connection, so the same integration serves customers of any
size.

## Deprovisioning
When a customer stops using scheduling in your product,
[deprovision](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/deprovision/index.md) their Managed
Organizational Unit. Your application's access to it ends immediately, and
Cronofy stops sending webhooks for it.

## From the Sandbox to production
- [Provision](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/provision/index.md) a Managed Organizational Unit for each customer when they turn on
scheduling in your product, and store the tokens against the customer.

- [Add](https://docs.cronofy.com/api-reference/managed-scheduling/managed-organizational-units/add-member/index.md) the customer's people as members.

- Create Scheduling Requests with the customer's access token, or embed the
Scheduler, as you did with the Sandbox.

- Handle webhooks sent to the `callback_url` to keep your records up to date.



---
[Read in HTML](https://docs.cronofy.com/developers/managed-scheduling/managed-organizational-units/)