Get a link that connects Calendly
Calendly asks the account’s owner to agree in a browser, so the API can’t connect an account by itself: send the link this returns to whoever owns the Calendly account. They sign in to LobbyStack as an owner or admin of the business, agree on Calendly’s page, and land on the dashboard’s integrations page, where they can pick the event type to book; PATCH /calendars/ can pick it too. The account needs a paid Calendly plan, Standard or above. Each appointment becomes a booking of that event type, made under a stand-in email address so Calendly never emails the caller, and the account’s bookings count as busy time. The link works until expires_at. A business with no owner or admin answers 409, because nobody could open the link: invite one with POST /team/invitations first. Connecting another Calendly account replaces the business’s Calendly connection, the one without a staff member. A deployment without Calendly answers 403.
Autorisations
An API key from Settings > API keys (lsk_...), which acts on its own business, or a platform key from the PLATFORM_API_KEYS setting (lsp_...), which onboards and manages businesses. Scopes: business:read, business:write, calls:read, contacts:read, contacts:write, appointments:read, appointments:write, messages:read, knowledge:read, knowledge:write, webhooks:manage, billing:manage, phone_numbers:manage, team:manage, businesses:create, users:create, phone_numbers:purchase, partner:read, partner.businesses:write, partner.demos:write, partner.packages:write, partner.branding:write, partner.templates:write, partner.team:write, partner.billing:read, partner.billing:write. Only platform keys can hold businesses:create and users:create, and only a key a partner made in its console can hold the partner scopes, which the Partner endpoints use. Only a partner's owners grant partner.billing:read and partner.billing:write.
En-têtes
The business a platform key acts on. Required with a platform key. A per-business key may leave it out; if it sends one, it must be the key's own business.
Réponse
Created
A link that connects a Google Calendar to the business.