# Path variable, but not starting at slash (/)

**URL:** <https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [August 5, 2024, 8:54am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045 "2024-08-05T08:54:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gauntlet-pl](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@gauntlet-pl](https://community.postman.com/u/gauntlet-pl)\
**Post date:** [August 5, 2024, 8:54am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/1 "2024-08-05T08:54:59Z")

</div>

Hi,

Was wandering if there is a way to make Postman recognise colon-syntax path variables that do not start at the slash. The API I’m working with uses the following notation a lot:

`https://some.host/path/to/api/code={objectCode}`

but the attempt to use it with the colon-syntax

`https://some.host/path/to/api/code=:objectCode`

seems to confuse Postman and does not yield expected results (which is of course recognising `objectCode` as one of the Path Variables)

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [August 5, 2024, 10:06am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/2 "2024-08-05T10:06:09Z")

</div>

Hi @gauntlet-pl. Welcome to the Postman Community:postman\_logo.

The column syntax isn’t a standardized form or describing URLs, and it seems like it is specific to the API you’re working with. : are typically used to specify the port in a URL. Are there other standardized options available for you to explore on this API?

---

<div class="post-metadata">

**Author:** ![gauntlet-pl](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@gauntlet-pl](https://community.postman.com/u/gauntlet-pl)\
**Post date:** [August 5, 2024, 11:01am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/3 "2024-08-05T11:01:44Z")

</div>

Hi @gbadebo-bello, thank you for your answer.

The colon syntax is a feature offered by the Postman desktop app for defining path variables within your API’s URL

![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/9/09e1d12ac9dca6fa374d7cf76cf5750892d711dd.png)

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [August 5, 2024, 11:11am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/4 "2024-08-05T11:11:48Z")

</div>

Hi @lunar-module-partic4. The example you have shown includes the use of a dynamic path parameter(path variable) named `workingVariable`.

This path parameter immediately precedes a forward slash, which is the expected and standard form for it in URLs.

Contrary to this, the ignoredVariable is not a path parameter or variable because the `:` is not preceding a forward slash. The path here will be `/code=:ignoredVariable`, which is static and can be made dynamic by adding a `:` before it which will make `/:code=:ignoredVariable` the variable name and a value can be specified for that.

The URL specification allows the inclusion of special characters like `:`, `=` in path parameters although they will have different meaning when used in other places like in a query parameter for example where `=` seperates the key and it’s corresponding value.

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [August 5, 2024, 11:50am UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/5 "2024-08-05T11:50:05Z")

</div>

@gauntlet-pl

Another idea is for you to use actual variables in your URL if you need to maintain that structure.

`https://some.host/path/to/api/code=:{{objectCodeVariable}}`

---

<div class="post-metadata">

**Author:** ![gauntlet-pl](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@gauntlet-pl](https://community.postman.com/u/gauntlet-pl)\
**Post date:** [August 5, 2024, 11:48pm UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/6 "2024-08-05T23:48:07Z")

</div>

Using variable (mustache) notation is not really an option as I have over a hundred endpoints like that and keeping over a hundred collection variables is not really the kind of environment that I’d like to create.

But, what I take from your response is that, by design, Postman currently do not support path variables that follow any character other than forward slash. Is there a place where I can request such feature?

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [August 6, 2024, 1:11pm UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/7 "2024-08-06T13:11:32Z")

</div>

Hi @gauntlet-pl.

You can make a feature request [here](https://github.com/postmanlabs/postman-app-support/issues/new/choose)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [September 5, 2024, 1:11pm UTC](https://community.postman.com/t/path-variable-but-not-starting-at-slash/65045/8 "2024-09-05T13:11:47Z")

</div>

Closed on September 5, 2024, 1:11pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
