Unable to create a workflow card

This is the message I am seeing while coding to create a workflow Card. I am following the documentation, but within the editor, that message appear for the card properties.

I do try to add the requested missing properties, still with no success.

Is the createCard( ) API is working?

Here is my code:

import {workflows} from 'wix-crm-backend';
import { dateToString } from 'backend/date.jsw';
const workFlowCancelReservid = "6d065cc7-c344-497c-847c-fa41a2c88f4f";
//const workFlowCancelReservid = "1961221a-1128-4c36-9b9c-d487ee80e527";
const phaseCancelReservid = "bea529f6-cccc-4bf0-ac1d-00ca0425877d";

export async function createCancelReservCard(contactId, facture, bookId){
let cardName = "Annulation facture# " + facture;
    createCard(workFlowCancelReservid, phaseCancelReservid, contactId, cardName, bookId)
}

export async function createCard(workflowId, phaseId, contactId, cardName, bookId, position = undefined){
    let TodaysDate = new Date();
    TodaysDate.setDate(TodaysDate.getDate());
    let idNumGen = new Number();
    idNumGen = Math.random();

  const cardWorkflow = {
     // "id": idNumGen.toString(),
      "name": cardName,
      "contactId": contactId
    // ,
    //  "source": "Invoices",
    //  "createdDate": TodaysDate,
    //  "updatedDate": TodaysDate,
    //  "phaseId": phaseId
      
    };

    console.log("Péparation pour créer une workflow card " + workflowId + "\n phase id= " + phaseId + "\ncard= " + cardWorkflow + "   " + JSON.stringify(cardWorkflow)) 

  let cardCancel = await workflows.createCard(
    workflowId,
    phaseId,
    cardWorkflow,
    position
  );

The function workflow.createCard is always returning undefined.

Did you get any solution here? Same issue. In fact same issue on many of the newer apis

no

@youge I made it work this way:

// create a card and add it to the corresponding workflow phase
export function createCard ( workflowId , phaseId , contactId , firstName , position ){
let cardInfo ={
“name” : firstName ,
“contactId” : contactId
};
return workflows . createCard ( workflowId , phaseId , cardInfo , position )
. then (( cardId ) => {
console . log ( “card contact” , cardId );

  **return**  [ cardId ]; 
}) 
. **catch** (( error ) => { 
  console . error ( error ); 
  **let**  response  =  error ; 
  **return**  response ; 
}); 

}