Creation of a webhook fails if the
endpoint_url value is a URL that contains a port number. In the example below, I used port number 80. Other port numbers do not work either.
Not using a port number allows you to successfully create a webhook (through both approaches).
Obviously, a port number is an optional yet valid component in the Authority Part of the URL syntax. In our case, it's highly desirable, as our integration point is an API that we expose (and not one of the websites that are themselves clients of our API).
Request
POST /v3/webhooks/?token=REDACTEDTOKEN HTTP/1.1
Content-Type: application/x-www-form-urlencoded
endpoint_url=http%3A%2F%2Fexample.org%3A80%2Fcallback
Response
400 BAD REQUEST
{"status_code": 400, "error_description": "There are errors with your arguments: endpoint_url - INVALID", "error": "ARGUMENTS_ERROR"}