In German, there are two words that can be translated as "the accident": der Unfall, which is when you fall off your bicycle, and der Zufall, which refers to a random occurrence or coincidence. When you talk about something happening zufällig ("accidentally"), it implies this aspect of randomness. When we want to talk about something happening "accidentally" simply in the sense of it being "unintentional," there is a better adverbial phrase to use:
Jetzt bin ich aus Versehen zu weit gelaufen und muss den Bus nach Hause nehmen.
Now I accidentally walked too far and have to take the bus home.
Caption 38, Shuah - Auf der Straße in BerlinPlay Caption
A less commonly used synonym for aus Versehen is ohne Absicht. Die Absicht means "the intention," "the aim," or "the purpose."
Das war Absicht.
That was on purpose.
Caption 16, JoNaLu - Überall BanditenPlay Caption
When we speak about something done "intentionally" or "on purpose," we can use either mit Absicht or the adverb absichtlich.
Ich konnte ja nicht wissen, dass du Max mit Absicht belogen hast.
I couldn't indeed have known that you lied to Max on purpose.
Caption 25, Die Pfefferkörner - Cybermobbing - Part 6Play Caption
Jemand hat Jannik Sternberg absichtlich vom Gerüst geschubst.
Someone intentionally shoved Jannik Sternberg off the scaffolding.Play Caption
Look absichtlich and aus Versehen up on Yabla German. Think of a few scenarios in which you would need to clarify whether an action was intentional or not and build a few sentences in the past tense. Here are a few pairs of nouns and verbs to get you started:
die Mail / weiterleiten
dich / anrufen
seinen Kaffee / trinken
die Tasche / zu hause lassen