Skip to main content
Let an agent check availability, collect the attendee’s details, book a time, and return confirmation. This example is loosely based on ZeroClick’s own demo booking flow.
This is a reference example, not a required API design or a drop-in implementation. Adapt the endpoints, fields, responses, and fulfillment steps to your product. Only the linked ZeroClick integration requirements are platform contracts.
Start with Overview and setup for the shared ZeroClick configuration, email policy, request guard, and testing guidance.

Example choices

  • ZeroClick policy: off is enough if you do not need the agent owner’s verified email. Use requested to receive it when available, or required if identifying the owner is essential to your product.
  • Seller input: require an attendee email to send the calendar invitation, regardless of the ZeroClick policy. A user can book for a colleague, so this address may differ from the agent owner’s verified email.
  • Fulfillment: your calendar integration creates the booking. ZeroClick forwards the request to your API.
You need a calendar integration that can list availability and create bookings. Use a test calendar while implementing the flow. The commands use the placeholder pay URL https://acme.pay.zeroclick.io; replace it with yours.

Build the example

1

Describe the action in your catalog

Add a service named Book a demo, with slug demo-booking. Describe who the demo is for, what it covers, how long it takes, and that it costs $0. Include the email requirement you chose.Register the endpoints and their request and response schemas so agents can discover how to complete the action. The core booking flow needs two:ZeroClick’s own flow also supports GET /demo/bookings/{bookingId} and POST /demo/bookings/{bookingId}/cancel for follow-up actions.For the booking body, document these fields:These fields describe the reference booking flow. Choose the inputs your own scheduling integration needs.
2

Validate the inputs and complete the action

After the guard allows the request, validate the fields, call your calendar provider, and return its confirmed result. The following handler outline uses the verifyFreeActionRequest helper from shared setup. parseBookingInput and calendar.createBooking are application functions you supply, not SDK methods.
The email in this example is the attendee address supplied to your endpoint. The ZeroClick plan policy neither requires this field nor verifies it. Keep a verified buyer email separate if you also receive one; see the two email choices.ZeroClick’s demo passes zcRequestId to its calendar integration as an idempotency key so a replay of the same forwarded request does not create a duplicate booking. A new agent request can have a new request id; add your own stable operation key if you need deduplication across those requests too.Return a clear error if the slot is no longer available or the provider cannot complete the booking. Confirm success only after the provider confirms it. Keep calendar credentials server-side.Return the successful response directly, without withUsage, reportUsage, or a zc-usage header. There is no charge to settle.
3

Test through your pay URL

Use a test calendar or a staging integration for booking tests. Fetch your storefront’s /auth.md and follow its instructions to obtain an agent access token. Then request availability:
Choose a returned start time and save a request as booking.json. This illustrates the body; replace start with a currently available slot and use your test attendee’s details:
A booking confirmation should include a booking id, status, and scheduled time. For example, these are fields returned by ZeroClick’s calendar integration:
Run the shared integration checks. For this example, also test an unavailable slot, invalid attendee details, and a replay of the same booking request. Each refusal should leave the calendar unchanged, and the replay should return the original booking.
4

Help agents find and finish the flow

Add agent discovery signals to your website, or use the Buy with AI widget with booking copy such as Book a demo with your AI and data-verb="Book".Describe the sequence in your service instructions: check availability, ask the user to choose a time, collect the required details, confirm the user’s intent to book, submit the booking, and report the confirmed time. Include the email policy so the agent knows whether human verification is needed.You can inspect ZeroClick’s agent storefront as a reference. For another free action, keep the same discovery, identity, and email choices, then replace the calendar call with your CRM submission, document delivery, or event registration.