# 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/sending-requests/variables/variables/) for more information.