# Webhook url path altered when using variables

**URL:** <https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567>\
**Category:** Questions\
**Tags:** webhook\
**Created:** [August 10, 2022, 7:14pm UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567 "2022-08-10T19:14:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micke](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/micke/32/10238_2.png) [@Micke](https://community.n8n.io/u/Micke)\
**Post date:** [August 10, 2022, 7:14pm UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567/1 "2022-08-10T19:14:15Z")

</div>

Hi, hope someone can help with this, I am about to go insane 🙃

## Describe the issue/error/question

When I add a webhook and specify the path “api” the full url will be  
[http://ip](http://ip):port/webhook-test/api

But if I add a variable to the path like api/:version the webhook url created be like  
[http://ip](http://ip):port/webhook-test/5f5040e5-463c-43fa-bbd0-64b1364e9a07/api/:version  
So n8n automatically add the webhook id to the url. I see no way of changing this in the UI.

## What is the error message (if any)?

No error but webhook url not like I would expect.

## Please share the workflow

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/0/0f3b0b0481a33af60c3175d4650c17b6dcd181bb.png)

## Information on your n8n setup

- \*\*n8n version: 0.190.0
- \*\*Database you’re using (default: SQLite):Postgres
- \*\*Running n8n with the execution process [own(default), main]:queues
- \*\*Running n8n via [Docker, npm, n8n.cloud, desktop app]:docker

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [August 11, 2022, 7:12am UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567/2 "2022-08-11T07:12:55Z")

</div>

Hi @Micke, welcome to the community!

That’s a good find. I wasn’t aware of this, but will make sure to add it to our internal bug tracker. Sorry for the trouble, we’ll make sure to let you know once this is fixed.

Perhaps you can consider using query parameters until this is fixed. As in using a path of `api` and then opening a URL like `.../api?foo=bar` to send a `foo` parameter with a value of `bar`?

---

<div class="post-metadata">

**Author:** ![Micke](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/micke/32/10238_2.png) [@Micke](https://community.n8n.io/u/Micke)\
**Post date:** [August 11, 2022, 7:21am UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567/4 "2022-08-11T07:21:16Z")

</div>

Hi @MutedJam  
Thank you for response. I ended up accepting the webhook id in the url (partly).  
If i create a webhook with a paramter i get a long url with the ID in the URL.  
If I copy this one and add a second paramter the base part of the URL persist.  
So now I get:  
ip:port/webhookId1/:path1/  
ip:port/webhookId1/:path2

And if I end up exposing this online I can hide the webhookId1 part with the loadbalancer.

Also [Webhook - Enhanced with dynamic elements in path RESTful API approach [GOT CREATED] - #8 by jan](http://community.n8n.io/t/webhook-enhanced-with-dynamic-elements-in-path-restful-api-approach-got-created/3090/8) seems to suggest this is the expected behaviour.

Best regards  
Mikael

---

<div class="post-metadata">

**Author:** ![vbarrier](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/vbarrier/32/2366_2.png) [@vbarrier](https://community.n8n.io/u/vbarrier)\
**Post date:** [September 20, 2023, 8:44am UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567/5 "2023-09-20T08:44:50Z")

</div>

Any new about this issue? It’s still happen today.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 20, 2023, 11:07am UTC](https://community.n8n.io/t/webhook-url-path-altered-when-using-variables/16567/6 "2023-09-20T11:07:53Z")

</div>

This is actually not a bug. That was implemented like that on purpose for technical reasons. Is probably something that will be reworked in the future but as far as I am aware is that sadly nothing that will become a priority any time soon.

What exactly do you try to do? Because there is maybe a workaround.
