How can we help?

Prefilling questions with secure token

When you send customers to NeetoCal booking page from your own website/application, you can fill in their details ahead of time so they don't have to retype them. The usual way is to add the details to the link itself, for example ?name=Sam&[email protected]. That works, but it means the customer's personal information travels inside the URL and can end up in browser history and server logs. If you'd rather keep that information out of the URL, you can use prefill token.

With a prefill token, your website sends the customer's details to NeetoCal once through the API and gets back a short code. You put only that code in the booking link. NeetoCal reads the code and fills in the form, so the details themselves never appear in the URL. Here is what happens from start to finish.

  1. The customer fills in a form on your site.

  2. Your website sends its details to NeetoCal and receives a prefill token in return.

  3. Your website sends the customer to the NeetoCal booking page with the token in the link.

  4. NeetoCal looks up the token and fills in the booking questions automatically.

Creating a prefill token

  1. If you don't already have an API key, create one from Admin panel > API Keys > Add API key. See API Keys for the full steps.

  2. From your website, send the customer's details to NeetoCal. Pass each answer inside a data object, and include your API key in the X-Api-Key header.

curl -X POST "https://example.neetocal.com/api/external/v1/prefill_tokens" \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{ "data": { "name": "Sam Taylor", "email": "[email protected]" } }'
  1. NeetoCal returns a prefill token that starts with pft_.

{ "prefill_token": "pft_k9f8a7b2c4d6e1a3f5b7" }

The keys inside data (name and email in the example above) are the field codes of your booking questions. Name and email use the name and email field codes by default. To fill any other question, use its field code as the key. See Pre-filling questions for how field codes work and how each question type is formatted.

Sending the customer to the prefilled booking page

  1. Add the token to your booking link as a prefill_token value:

https://example.neetocal.com/meeting-with-oliver-smith?prefill_token=pft_k9f8a7b2c4d6e1a3f5b7
  1. Redirect the customer to that link. When the booking page opens, the questions are already filled in with the details you stored, and none of those details appear in the URL.

How long does a prefill token last

A prefill token stays valid for up to 30 days. NeetoCal automatically removes tokens older than 30 days, so create the token close to the time you send the customer to the booking page.