> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agents.labs.bandwidth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a Calendly connection

> Start interactive Calendly authorization for the selected workspace.

Requires Admin or Owner. Send no request body. API-key requests require the [workspace header](https://docs.agents.labs.bandwidth.com/api-reference/workspaces.md); bearer requests use the account’s selected workspace.

1. **Before starting, sign in to Agent Builder in the browser you will use for consent.** Use the same account as the request credential’s owner and select the workspace you intend to connect. Keep that session and workspace selection throughout authorization.
2. Call this endpoint and read `authorization_url`.
3. Open that URL in the signed-in browser to approve Calendly scheduling read/write access. An API key does not replace Calendly consent.
4. Calendly redirects to Agent Builder’s `/integrations/calendly/callback` page. The page uses the existing session to submit [Complete authorization](https://docs.agents.labs.bandwidth.com/api-reference/calendly/callback.md) automatically.
5. [Read connection status](https://docs.agents.labs.bandwidth.com/api-reference/calendly/status.md). Select the linked Calendly tools in each agent that should use them; connecting does not select tools automatically.

The pending authorization expires after 10 minutes and is bound to the initiating user and workspace. Starting another attempt replaces the previous pending attempt. Do not log or reuse the returned authorization URL. If the browser session is missing or the wrong account/workspace is selected, the callback cannot resume after you sign in: correct the session and start a fresh connection attempt.

This operation can contact Calendly for authorization discovery and client registration. Provider failures can return `502`; an unavailable callback configuration returns `503`. Start a fresh attempt if the authorization expires.


## OpenAPI

````yaml POST /api/v1/integrations/calendly/connect
openapi: 3.1.0
info:
  title: Bandwidth Agent Builder API
  version: v1
  description: >-
    Manage agents, place calls, and retrieve conversation results in your
    workspace.
servers:
  - url: https://agents.labs.bandwidth.com
    description: Workspace API
security: []
paths:
  /api/v1/integrations/calendly/connect:
    post:
      tags:
        - calendly
      summary: Start a Calendly connection
      description: >-
        **Authorization:** Requires an Admin or Owner role in the requested
        workspace.


        Start interactive Calendly authorization for the selected workspace.
      operationId: connect_calendly_api_v1_integrations_calendly_connect_post
      parameters:
        - description: >-
            Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace
            ID to access. The key owner must be a current member. Missing or
            invalid IDs return 400; non-member workspaces return 403. Not
            required for bearer authentication, which uses the user's selected
            workspace.
          in: header
          name: X-VOAI-ORGANIZATION-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Required with X-BW-LABS-AGENTS-API-KEY: the positive local
              workspace ID to access. The key owner must be a current member.
              Missing or invalid IDs return 400; non-member workspaces return
              403. Not required for bearer authentication, which uses the user's
              selected workspace.
            title: X-Voai-Organization-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalendlyAuthorization'
          description: Successful Response
        '400':
          description: Invalid request or missing/invalid workspace header with an API key.
        '401':
          description: Missing, invalid, or expired credential.
        '403':
          description: >-
            The account lacks access to the workspace, resource, or required
            role.
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '502':
          description: Calendly could not complete the request.
        '503':
          description: The Calendly callback URL is not configured.
      security:
        - LabsAuth: []
        - LabsApiKey: []
components:
  schemas:
    CalendlyAuthorization:
      properties:
        authorization_url:
          title: Authorization Url
          type: string
          description: >-
            Short-lived URL for interactive Calendly consent. The pending
            attempt expires after 10 minutes.
      required:
        - authorization_url
      title: CalendlyAuthorization
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    LabsAuth:
      description: >-
        Bandwidth Labs OAuth access token. Uses the user's selected workspace;
        the workspace header is not required. Do not also send an API key.
        Bearer-only operations may additionally require the Labs `super_user`
        role.
      scheme: bearer
      type: http
    LabsApiKey:
      description: >-
        Bandwidth Labs API key. Also send `X-VOAI-ORGANIZATION-ID` with a
        positive local workspace ID belonging to the key owner. Access follows
        the owner's current workspace role. Do not also send a bearer token. API
        keys cannot access bearer-only or Labs `super_user` operations.
      in: header
      name: X-BW-LABS-AGENTS-API-KEY
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.