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

# Create prefill token

> Create a prefill token that stores a set of booking-form values. Prefill tokens are automatically deleted one month after they are created.

<Info>Replace `{your-subdomain}` with your workspace’s subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>

## Prefilling a scheduling link

To prefill a scheduling link using a `prefill_token`, use this two-step flow:

1. Call this endpoint with the values you want prefilled. It returns a `prefill_token`.
2. Append the token to the scheduling link's URL as a `prefill_token` query parameter and share the link. For example:

`https://{your-subdomain}.neetocal.com/{meeting-slug}?prefill_token={prefill_token}`


## OpenAPI

````yaml bundled/prefill-tokens.yaml POST /prefill-tokens
openapi: 3.0.3
info:
  title: NeetoCal Prefill Tokens APIs
  version: 2.0.0
servers:
  - description: NeetoCal APIs
    url: https://{your-subdomain}.neetocal.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Prefill tokens
    description: >-
      APIs to prefill a booking form without exposing personal data in the
      scheduling link.
paths:
  /prefill-tokens:
    post:
      tags:
        - Prefill tokens
      summary: Create a prefill token
      description: >-
        Create a prefill token that stores a set of booking-form values. Prefill
        tokens are automatically deleted one month after they are created.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  additionalProperties: true
                  description: >-
                    Key-value pairs are used to prefill the booking form. The
                    key of each field should be the field code of the question,
                    and the value is what that question should be prefilled
                    with. The field code can be found in scheduling link's
                    Settings -> Questions -> 3 dot menu of the question -> Edit
                    -> Advanced properties. See the [pre-filled scheduling
                    link](https://help.neetocal.com/p/a-164d3375) help article
                    for more on field codes. If the same field is also passed as
                    a query parameter on the link, that value takes precedence
                    over the token.
                  example:
                    name: Oliver Smith
                    email: oliver@example.com
                    phone: '+15551234567'
              required:
                - data
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  prefill_token:
                    type: string
                    description: The generated prefill token. Always prefixed with `pft_`.
                    example: pft_428518d70eb35deab7a8
        '422':
          description: Unprocessable Entity - The `data` param is missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'param is missing: data'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string

````