I have two suggestions to help you figure out what's going wrong.
First, set a breakpoint at the start of the postTaniTalep function. Step through the code line by line and check that everything in the request is what you expect to see. If you haven't used Xcode's debugger before, the following article will help you:
https://www.swiftdevjournal.com/an-introduction-to-xcodes-debugger/
Second, you have the following line of code to make the network call:
let (data, response) = try await URLSession.shared.data(for: request)
The code uses try. Code with try can throw errors, but you don't handle them. Wrap the network call in a do-catch block and at least print the error in the catch part of the block. The error message you get should be more helpful than "400 Bad Request".