[ API JS ] missing header message for update

I have this error message only for update :
Error: Request failed with status code 401 / Grist: Bad request (missing header)
For fetching it’s working , is there a specific header I should add for the update?

Thanks

const { GristDocAPI } = require('grist-api');

await api.fetchTable('Books',
        {
            status: ['Accepted'],
            meta_data_status: ['Completed'],
            audio_status: ['Completed'],            
            is_published: [false]
        });
await api.updateRecords('Books',[{
                'id': catalog.id,                
                'status': "In_progress"
            }]);

My bad, the API key was missing in the environment variables.
I didn’t know we can fetch without the API key.
That’s why I thought the key was already there.