Try quoting and URL encoding the URL and perhaps omit the quotes from the URL, eg:
url: "https://gotify.mydomain.com/message?token=XXXXXXX%20-F%20message=Disk%20space%20on%20{{ inventory_hostname }}%20is%20above%2090%!"
Or omit the query string altogether and submit the data as JSON, there seems to be little point in submitting data the using a query string unless you are forced to use GET rather than POST? It would also be a better in terms of security to not submit the token
value in the URL.
See also this thread relating to the same error:
Which was automatically closed 17 hours ago, I personally think threads should be left open for longer than the current time limit, this discussion could have taken place on that thread or this thread could have been merged into that one…
Both threads relate to the same error message from the URI module:
URL can’t contain control characters.