How can we help?

Generating one-off scheduling links for embeds

A one-off scheduling link is a NeetoCal link that can be used to book only one meeting. The moment that booking is made, the link stops working. By combining a one-off link with the NeetoCal embed, you can give every visitor to your site their own personal booking link that disappears after a single use.

This is useful when:

  • You want to make sure the same customer cannot accidentally book twice (for example, when they click the browser back button after booking and the embed reloads).

  • You want each booking to be linked to a specific record in your system, such as an order number or a customer ID.

  • You do not want a single link to be shared by one customer and reused by other people.

The site that hosts the embed will ask NeetoCal for a fresh link each time a visitor opens the page, and then use that fresh link in the embed code.

From your website's backend, make this request to NeetoCal (full reference: Create one-off scheduling link):

curl -X POST \
  https://your-subdomain.neetocal.com/api/external/v2/meetings/MEETING_SID/one-off-links \
  -H "X-API-KEY: YOUR_API_KEY"

Three values to replace:

  • your-subdomain is your NeetoCal workspace subdomain. See Workspace subdomain if you are not sure what yours is.

  • MEETING_SID is the SID of the scheduling link you want the one-off link to be based on. See Scheduling link SID to find it.

  • YOUR_API_KEY is your workspace API key. See API keys to create one, and Authentication for how the key is sent with the request.

NeetoCal returns a unique slug and the full booking URL:

{
  "one_off_link": {
    "slug": "one-off-c5530bc7c9ab",
    "url": "https://your-subdomain.neetocal.com/one-off-c5530bc7c9ab"
  }
}

Every call returns a different slug, so make this call once per visitor, right before the page with the embed is shown to them.

Using the slug in the embed code

Take the slug that NeetoCal returned and place it in the slug field of the embed code:

<div style="width: 100%;" id="inline-embed-container"></div>
<script>
  window.neetoCal = window.neetoCal || {
    embed: function () { (neetoCal.q = neetoCal.q || []).push(arguments) }
  };
</script>
<script async src="https://cdn.neetocal.com/javascript/embed.js"></script>
<script>
  neetoCal.embed({
    type: "inline",
    organization: "your-subdomain",
    elementSelector: "#inline-embed-container",
    styles: "height: 100%; width: 100%;",
    queryParams: { "dynamicHeight": true },
    slug: "one-off-c5530bc7c9ab",
    isSidebarAndCoverImgHidden: "false",
    shouldForwardQueryParams: "false"
  });
</script>

The slug value is the only thing that changes from visitor to visitor. The rest of the code stays the same as a normal embed.

What happens after the customer books

The moment the customer finishes booking, the slug stops working. If the same customer clicks the back button and the embed reloads, they see a "link expired" message instead of being able to book again.

If a visitor leaves the page without booking, the slug is still valid. You can save it alongside the customer's record in your system and reuse the same link when they come back.