I fix it by passing the id to ficheiro without the data field:
const fileIds = [
...existingFiles, // Manter os arquivos existentes
...uploadData.map((file) => ({
titulo: file.name, // Nome do arquivo
publico: true,
ficheiro: {
id: file.id, // ID do arquivo
},
})),
]