Cant update dns record, error "Request body is invalid"

I can not update the dns record

def updateRecord(ip):
    data = {
        "type": "A",
        "name": domain, # fqdn
        "content": ip,
        "ttl": 1, # or removed or "auto" > same error
        "proxied": True
    }

    r = requests.put(
        url=f"https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records/{record_id_a}",
        headers=headers,
        data=data,
        timeout=15
    )

    print(r.content) # {"result":null,"success":false,"errors":[{"code":9207,"message":"Request body is invalid."}],"messages":[]}

Can someone tell me where the error is?

If you pass a dict as the data parameter it gets serialized to a URL-encoded form:
requests.post(url, data={'hello':'world'})hello=world

If you want to send a JSON object you must pass a string:
requests.post(url, data=json.dumps({'hello':'world'})){"hello":"world"}

Alternatively, you can use the json parameter instead:
requests.post(url, json={'hello':'world'}){"hello":"world"}