def _broadcast_add(key: db.Key):
    # Load the keyservers from the config file.
    keyservers = cfg.cfg.config.keyservers_synch
    for server in keyservers:
        assert isinstance(server, str)
        if not server.startswith("http"):
            # Force HTTPS by default, for security.
            server_url = "https://" + server
        else:
            server_url = server
            server = server.split("://")[1]

        try:
            r = requests.post(server_url + "/api/v{}/sync/new".format(cfg.API_VERSION), data={"key": key.armored})
        except requests.exceptions.ConnectionError:
            continue

        if r.status_code == 200:
            # good!
            continue
        elif r.status_code == 599:
            # Invalid key.
            break