Problems with webhook

I try to send a message to a zulip instance

I ve created a webhook in erpnext and got this error

Traceback (most recent call last):
File “apps/frappe/frappe/integrations/doctype/webhook/webhook.py”, line 180, in enqueue_webhook
r.raise_for_status()
File “env/lib/python3.10/site-packages/requests/models.py”, line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://url/api/v1/messages?type=stream&to=Streamname"

zulip is accessable from the internet with ssl certificate

in webhook request log I can see the headers, data and url
I ve copied everthing in a python script on erpnext and run it from cli

#!/usr/bin/python3
url = “https://url/api/v1/messages?type=stream&to=Streamname
import requests
data = {
“content”: “test”,
“topic”: “ISS-2024-00017”
}
header = {
“Authorization”: “Basic base64 coded username and password”,
“Content-Type”: “application/x-www-form-urlencoded”,
“User-Agent”: “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36”
}
r = requests.post(url,data=data,headers=header)
print(r)
print(r.status_code)
print(r.text)

Answer

<Response [200]>
200
{“result”:“success”,“msg”:“”,“id”:9052}

everthing is working as exepected.
where can I digg deeper to find the problem in erpnext

thanks