Issue when updating an entity storage record via a serverless custom app

I’m having an issue when attempting to update a record in entity storage via a serverless custom app.

I can create, retrieve, or even delete the records with no issues, but when I try to update using the displayId along with the fields, I get this:

{ “status”: 400, “message”: “invalid input” }

The entity has 3 fields, which I’m including when creating new ones, but when updating, I’m providing 2, the id, which is required, and the groups.

server.js

const updateData = {
          id: agentId,
          groups: groupNames
};
      
const updateResult = await $entity.get('agents').update(`${displayId}`, updateData);

Here is a sample of the updateData
{ "id": 68000955555, "groups": "Service Requests, Installers" }

Here is the entities.json

{
    "agents": {
      "fields": [
        {
            "name": "id",
            "label": "id",
            "type": "integer",
            "filterable": true,
            "required": true
        },
        {
          "name": "name",
          "label": "name",
          "type": "text",
          "filterable": true,
          "required": false
        },
        {
            "name": "groups",
            "label": "groups",
            "type": "text",
            "filterable": true,
            "required": false
        }
      ]
    }
}

Any idea on what could be the issue here?

Thanks.