Calling an API with Variable Path (Possibly Not Documented Solution)

In your case the brackets are not setting a querystring, they are setting part of the path. So, you could do https://lookups.twilio.com/v1/PhoneNumbers/[phone number to lookup] or https://lookups.twilio.com/v1/PhoneNumbers/[phone number] or any other “key” name.

Whatever is in the brackets just becomes the Name which will use the Value as part of the path.

Otherwise, if you wanted to dynamically set the querystring (i.e. after the ?), then you would put that in the URL.

https://lookups.twilio.com/v1/PhoneNumbers?phoneNumber=[phone number to lookup]

Here’s another example for the same topic. Accessing API without key/value pair