Because of that I cannot pass the file id when I make an Engagement.
But your answer made me research more and I found out that after uploading the file I can check the status of the uploaded file with this endpoint: /files/v3/files/import-from-url/async/tasks/{taskId}/status , where I can get the file id and url in the response.
So I will accept your answer as a solution, although what I was exactly looking was something else.