> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Use variables in WebSocket requests

You can use Postman variables in the URL of a WebSocket connection or the body of a message. For example, you can create a variable named `my_host`, set the value to `example.com`, and then use `ws://{{my_host}}/api/example` as a URL. If you enter `{{` in either the URL box or message editor, you can autocomplete your variables.

See [Store and reuse values using variables](/docs/use/send-requests/variables/variables/) for more information.