The best resource on this topic if you are just getting started is the Proxy Guide:
Long story short, Kong doesn’t have to know about the dynamic segments in your URL path component. Specifying a prefix (e.g. /lead) will work just fine. Most likely, your API will return HTTP 404 in the event than a request hits a non-existing path (e.g. /lead/foo).
If you’d rather enforce that Kong can only proxy those two paths, then a regex path is your goto choice (also documented in the above resource). You can leverage regex capture groups to extract the value of those path segments. Have a look at this post for an in-depth dive into regex paths and capture groups: