---
title: "Connect or reconnect a booking provider"
method: POST
path: "/api/bookings/providers/{provider}/connection"
tags: ["Booking providers"]
---

# Connect or reconnect a booking provider

`POST /api/bookings/providers/{provider}/connection`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/bookings/providers/{provider}/connection`
- Auth: API key in cookie `luca.session_token`

Stores the provider credentials, encrypted, and mints a webhook secret the provider signs its callbacks with. The secret comes back once, in this response, so capture it here. Calling it again on a connected provider replaces the credentials.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `provider` 'manual' | 'calendly' | 'cal_com' | 'google_calendar' | 'iclosed' | 'gohighlevel', required

## Headers

- `Luca-API-Version` '1'

## Request body

- BookingProviderConnectionCreate
  - `credentials` object, required
    - `accessToken` string, required
    - `refreshToken` string, nullable
    - `accountId` string
    - `locationId` string
  - `expiresAt` string, date-time, nullable

## Response `200`

ok

- BookingProviderConnectionResponse
  - `provider` 'manual' | 'calendly' | 'cal_com' | 'google_calendar' | 'iclosed' | 'gohighlevel', required
  - `health` 'connected' | 'missing_credentials' | 'degraded', required
  - `connectedAt` string, nullable, required
  - `expiresAt` string, nullable, required
  - `reconnectRequired` boolean, required
  - `webhookSecret` string

## Other responses

- `400`: bad request
- `401`: unauthorized
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
