/api/users and /api/users/ are two different URLs. The trailing slash is part of the path, so the browser and server see them as separate addresses.
It’s not a browser thing. Browsers just send whatever you type. The server (or the framework the programmer set up) decides what to do with each one.
Some servers treat them as completely different pages, others automatically redirect one to the other so users don’t notice.
On
pebbl.fun, the version with the slash redirects to the one without it. So only one of them is the “real” page.One practical difference that often trips people up is how relative links resolve (see the image). That’s why being consistent matters, especially with APIs.
Just use whichever version the docs show. Don’t assume the slash is optional.
