*** title: Use variables in WebSocket requests updated: 2025-02-24T00:00:00.000Z max-toc-depth: 2 ---------------- 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/sending-requests/variables/variables/) for more information.