Add input blocks to your notebook

You can add variables and reference them elsewhere in your notebook to create an interactive experience. For example, you can add an input block for your API consumer's email address and use a request block to send them a welcome message.

Add an input block

To add an input block, do the following:

  1. Open your notebook or create a new one.

  2. Place your cursor where you want to add the input block. Then, type a forward slash ("/"). Postman displays a block menu.

  3. Choose an input block type:

    • String icon Text - Choose for strings, such as names or email addresses.
    • Number icon Number - Choose for numbers, such as integers or floats.
    • Lock icon Secret - Choose for sensitive data, such as API keys or tokens.

    Important: Protect your sensitive data. If Postman detects any API keys, tokens, or similar, it replaces them with placeholders. To learn more, see Postman Secret Scanner.

  4. Name your input block.

  5. (Optional) Define a default value.

Reference your input block

You can reference your input block by name. For example, if you name your input block "email", you can reference it in another input block or request block with the syntax {{email}}. Or you can reference it in a code runner block with the syntax $email.

To reference your input block, do the following:

  1. Open your notebook or create a new one.

  2. Get your input block's name.

  3. Reference your input block:

    • To reference your input block in another input block or a request block, use the syntax {{inputBlockName}}.
    • To reference your input block in a code runner block, use the syntax $inputBlockName.

Last modified: 2025/07/28