canonical: https://jentic.com/apis/onsched.com/onsched-setup-api

# OnSched Setup API

OnSched is a developer-first online booking platform. The Setup API exposes the configuration surface that backs every consumer booking flow: companies, business users, calendars, services, resources, locations, blocks, and the rules that determine when a service can be booked. With 139 endpoints, it covers every CRUD operation an admin or platform integrator needs, including reassigning appointments to different resources and recovering soft-deleted calendars. It is paired with the Consumer API that handles end-user booking and the Utility API that handles health checks.

## For AI agents

Configure companies, services, resources, calendars, and business rules that back OnSched booking flows using OAuth 2.0 client-credentials authentication.

## Scope

Does not handle end-user booking flows or platform health checks - use for company, calendar, and business-user configuration only.

## Capabilities

- Provision and update companies and their domains
- Manage business users, including their permissions and the companies they belong to
- Create, update, and recover calendars, plus list services attached to a calendar
- Block out time on a calendar and remove or update those blocks
- Reassign an appointment to a different resource without recreating it
- List appointments at the admin level for reporting or back-office tooling
- Authenticate with OAuth 2.0 using a ClientId and Secret bound to a company profile

## Use cases

### Tenant provisioning for a booking platform

A vertical SaaS that sits on top of OnSched needs to provision a new tenant when a customer signs up: create the company, attach domains, configure business users, and stand up the calendars and services. The Setup API covers all of those steps in a single auth domain, so the SaaS can ship signup-to-bookable in a few days. Each provisioning step is idempotent enough to be retried safely.

Example prompt: POST `/setup/v1/companies` for the new tenant, POST `/setup/v1/companies/domains`, then POST `/setup/v1/calendars` and `/setup/v1/businessusers` as needed.

### Calendar and resource administration

Operations admins manage day-to-day changes: blocking time off, adding new staff, retiring services, and reassigning bookings when a resource calls in sick. The Setup API supports each of these directly without requiring a UI round-trip, including PUT `/setup/v1/appointments/{id}/reassign/resource/{resourceId}` for reassignment and the calendar block CRUD endpoints. Most ops automations are built as scheduled jobs against the API.

Example prompt: POST `/setup/v1/calendars/{id}/block` to mark out a public holiday, then PUT `/setup/v1/appointments/{id}/reassign/resource/{resourceId}` for any clashes.

### Multi-company franchise rollout

Franchise networks roll out OnSched across many companies that share configuration patterns. The Setup API exposes companies, business users, and the calendars under each, so a rollout script can clone a reference configuration into each new franchisee's company. The `/setup/v1/businessusers/{email}/companies` lookup makes it easy to attach a regional manager to all the companies they oversee.

Example prompt: Read the reference company's calendars and services, then POST `/setup/v1/companies` and copy each calendar and service into the new company's profile.

### AI agent platform configuration through Jentic

An AI assistant that helps a SaaS admin configure new tenants can call the OnSched Setup API through Jentic. The agent searches Jentic for the configuration operations, loads their schemas, and provisions companies, business users, and calendars. Jentic injects the OAuth credential at execution time so the agent can act across many tenants without holding their secrets.

Example prompt: Search Jentic for 'create onsched company', load the POST `/setup/v1/companies` operation, and execute it with the new tenant's name and timezone.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/setup/v1/companies` | Create a new company tenant |
| POST | `/setup/v1/companies/domains` | Attach a domain to a company |
| POST | `/setup/v1/calendars` | Create a calendar under a company |
| POST | `/setup/v1/calendars/{id}/block` | Block time on a calendar |
| PUT | `/setup/v1/calendars/{id}/recover` | Recover a soft-deleted calendar |
| POST | `/setup/v1/businessusers` | Create a business user account |
| PUT | `/setup/v1/appointments/{id}/reassign/resource/{resourceId}` | Reassign an appointment to a different resource |

## Key resources

- **Companies** — Top-level tenant records and the domains attached to them
- **Business Users** — Admin and staff accounts, their permissions, and company memberships
- **Calendars** — Bookable diaries with services, blocks, and recovery actions
- **Appointments (admin)** — Admin-side appointment lookup and reassignment
- **Domains** — Hostnames registered against a company for the booking widget

## Why Jentic

- **Setup:** Wiring the OnSched Setup API by hand means running the OAuth2 client-credentials flow, tracking token expiry, and calling the OnSched configuration host across companies, calendars, and business users yourself. Through Jentic you install once, import the OnSched Setup API from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** OnSched Setup puts the calendar id in the URL path (`/setup/v1/calendars/{id}/block`), so a rule can pin your agent to one calendar for blocking and recovery. You choose the operations it may call, so account-shaping ones like creating a new company tenant are not included unless you add them.
- **Credential handling:** Your OnSched client credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a calendar for a company' or 'add a business user', and Jentic returns the matching OnSched Setup operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OnSched Consumer API** — End-user booking surface that consumes the Setup API's configuration
- **Calendly API** — Hosted scheduling product with simpler configuration than OnSched
- **Acuity Scheduling API** — Service-business scheduling with a lighter admin API

## FAQ

### What authentication does the OnSched Setup API use?

The Setup API uses OAuth 2.0 client credentials, the same as the Consumer API. Each tenant has a ClientId and Secret bound to its company profile. Through Jentic, the credentials are stored in the vault and the access token is refreshed transparently, so an agent provisioning many tenants never sees raw secrets.

### Can I provision a new company end-to-end with this API?

Yes. Start with POST `/setup/v1/companies`, attach domains via POST `/setup/v1/companies/domains`, then create the calendars under that company with POST `/setup/v1/calendars` and seed business users with POST `/setup/v1/businessusers.` The Setup API covers the full provisioning path in a single auth domain.

### How do I block time on a calendar with the OnSched Setup API?

POST `/setup/v1/calendars/{id}/block` with the start and end times. To list existing blocks, GET `/setup/v1/calendars/{id}/blocks.` To edit or remove a block, use PUT `/setup/v1/calendars/block/{id}` or DELETE `/setup/v1/calendars/block/{id}.` These endpoints back both holiday calendars and ad hoc time-off.

### What are the rate limits for the OnSched Setup API?

OnSched does not publish a single global rate limit in the spec. Bulk provisioning scripts should batch reads with the list endpoints, avoid polling for state, and back off on 429 responses. The Setup API has 139 endpoints, so plan for paginated reads and don't try to enumerate every calendar in a tenant in a single call.

### How do I reassign an appointment through Jentic?

Install the SDK with 'pip install jentic', search for the operation with the query 'onsched reassign appointment', then load the PUT `/setup/v1/appointments/{id}/reassign/resource/{resourceId}` operation, and execute it with the appointment id and the new resource id. Jentic handles the OAuth refresh.

### Can I recover a calendar that was deleted by mistake?

Yes. PUT `/setup/v1/calendars/{id}/recover` restores a soft-deleted calendar along with its services attachment. This is the difference between OnSched's setup model and a hard-delete API, and it is the safe path for ops teams that want to undo an accidental change.

### Can I limit what my agent is allowed to do with the OnSched Setup API?

Yes. Jentic One is self-hosted by you, so your own rules decide which OnSched Setup operations and credentials the agent may use. Because the calendar id sits in the URL path, such as POST `/setup/v1/calendars/{id}/block` and PUT `/setup/v1/calendars/{id}/recover`, you can pin the agent to a single calendar for blocking and recovery. You also choose the exact operations it may call, so account-shaping ones like POST `/setup/v1/companies` to create a new tenant stay out of reach unless you add them.
