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

# Book a web-found business online

> Has Cal's booking agent book a service on a business's own online booking page for the user, the way Cal.ai does once the user approves. Only a business that `GET /v2/discover/listings/search` returned in `webBusinesses` to this same user in the last 24 hours can be booked, with its URL exactly as returned; a Discover listing is never booked this way, because it is booked from its `bookingUrl`. Every check runs before the job starts: the account may book online, has a username, has fewer than the allowed number of jobs running, and its plan covers the booking. The booking agent browses with AI, so a user in an organization that opted out of AI cannot book online. A job that is not started answers `created: false` with the `reason` and spends no budget. A started job answers with `jobUrl`, the job's page, where the user picks an appointment option, approves the price and terms, or cancels: this API never chooses or approves anything. Every request carries an `idempotencyKey` the client generates once per booking; send the same key to retry the same request and get the same job back without spending the budget again, even after the business's allowlist entry expired or its page went down; a deployment that cannot run jobs on Trigger.dev answers `created: false`. Jobs are limited to 3 an hour per user, shared across all of the user's API keys and access tokens. If accessed using an OAuth access token, the `PROFILE_WRITE` scope is required.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /v2/discover/booking-jobs
openapi: 3.0.0
info:
  title: Cal.com API v2
  description: ''
  version: 1.0.0
  contact: {}
servers: []
security: []
tags: []
paths:
  /v2/discover/booking-jobs:
    post:
      tags:
        - Discover
      summary: Book a web-found business online
      description: >-
        Has Cal's booking agent book a service on a business's own online
        booking page for the user, the way Cal.ai does once the user approves.
        Only a business that `GET /v2/discover/listings/search` returned in
        `webBusinesses` to this same user in the last 24 hours can be booked,
        with its URL exactly as returned; a Discover listing is never booked
        this way, because it is booked from its `bookingUrl`. Every check runs
        before the job starts: the account may book online, has a username, has
        fewer than the allowed number of jobs running, and its plan covers the
        booking. The booking agent browses with AI, so a user in an organization
        that opted out of AI cannot book online. A job that is not started
        answers `created: false` with the `reason` and spends no budget. A
        started job answers with `jobUrl`, the job's page, where the user picks
        an appointment option, approves the price and terms, or cancels: this
        API never chooses or approves anything. Every request carries an
        `idempotencyKey` the client generates once per booking; send the same
        key to retry the same request and get the same job back without spending
        the budget again, even after the business's allowlist entry expired or
        its page went down; a deployment that cannot run jobs on Trigger.dev
        answers `created: false`. Jobs are limited to 3 an hour per user, shared
        across all of the user's API keys and access tokens. If accessed using
        an OAuth access token, the `PROFILE_WRITE` scope is required.
      operationId: DiscoverBookingJobsController_createBookingJob
      parameters:
        - name: Authorization
          in: header
          description: >-
            value must be `Bearer <token>` where `<token>` is api key prefixed
            with cal_, managed user access token, or OAuth access token
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDiscoverBookingJobInput'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDiscoverBookingJobOutputResponseDto'
        '400':
          description: The body is not one the booking agent accepts
        '401':
          description: Unauthenticated
        '403':
          description: Insufficient permissions
        '429':
          description: >-
            Too many requests with this credential, or more than 3 jobs this
            hour for this user across all of their credentials. Retry later.
components:
  schemas:
    CreateDiscoverBookingJobInput:
      type: object
      properties:
        businessUrl:
          type: string
          maxLength: 2048
          description: >-
            The business's URL, exactly as a `search_listings` web business gave
            it in `webBusinesses[].url`. Only a business found by your own
            search in the last 24 hours can be booked.
          example: https://barbers.example/book
        service:
          type: string
          minLength: 1
          maxLength: 80
          description: What to book, in plain words, such as `haircut`.
          example: haircut
        area:
          type: string
          minLength: 1
          maxLength: 120
          description: 'The user''s area as they gave it: a ZIP code, neighborhood or city.'
          example: Capitol Hill, Seattle
        daysFromToday:
          type: number
          minimum: 0
          maximum: 60
          description: >-
            The day the user asked for, in days from today in their saved time
            zone: `0` today, `1` tomorrow.
          example: 1
        partOfDay:
          enum:
            - morning
            - afternoon
            - evening
            - any
          type: string
          description: >-
            The part of that day the user asked for; `any` when they did not
            say.
          example: afternoon
        budgetDollars:
          type: number
          minimum: 1
          maximum: 100000
          description: >-
            The most the user wants to pay for the service, in US dollars, when
            they said so.
          example: 60
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            A key you generate once per booking, such as a UUID. Send the same
            key to retry the same request: you get its job back, and no second
            job starts.
          example: 4b7d1c2e-9f0a-4e1b-8c3d-2a6f5e7d9b10
      required:
        - businessUrl
        - service
        - area
        - daysFromToday
        - partOfDay
        - idempotencyKey
    CreateDiscoverBookingJobOutputResponseDto:
      type: object
      properties:
        status:
          enum:
            - success
            - error
          type: string
          example: success
        data:
          $ref: '#/components/schemas/CreateDiscoverBookingJobData'
      required:
        - status
        - data
    CreateDiscoverBookingJobData:
      type: object
      properties:
        created:
          type: boolean
          example: true
          description: >-
            Whether the booking agent started a job. When false, `reason` says
            why.
        jobId:
          type: string
          example: cm9x1booking0job
          description: The job's id; set when `created` is true.
        jobUrl:
          type: string
          example: https://app.cal.com/discover/book/cm9x1booking0job
          description: >-
            The job's page, where the user follows its progress, picks an
            appointment option, approves the price and terms, or cancels; set
            when `created` is true.
        reason:
          type: string
          example: The assistant cannot book online for this account.
          description: >-
            Why no job was started, in words to pass on to the user; set when
            `created` is false.
        signInRequired:
          type: boolean
          enum:
            - true
          description: Set when the user must sign in before a job can start.
        paymentRequired:
          type: boolean
          enum:
            - true
          description: >-
            Set when the user must pick a Discover plan first; `planUrl` is
            where they pick it.
        planUrl:
          type: string
          example: https://app.cal.com/settings/discover/preferences
          description: Where the user picks a Discover plan; set with `paymentRequired`.
      required:
        - created

````

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