Passing CRM customer ID via Web Messaging SDK startChat config

Problem
Need the CRM customer ID inside the chat context. Python backend relies on this for routing. Web Messaging SDK startChat method takes a config object. We’ve been stuffing the ID into contactAttributes. Doesn’t seem to work though.

Code
Backend spits out this JSON. Frontend grabs it.

{
 "organizationId": "org-xyz",
 "contactAttributes": {
 "crmId": "12345"
 }
}

Client code is basic.

messagingSdk.startChat({
 organizationId: 'org-xyz',
 contactAttributes: { crmId: '12345' }
});

Error
Handshake goes through. No 401. Webhook hits our Flask endpoint. contactAttributes map is empty {}. Weird. Tried putting the ID at the root of the config. SDK throws a 400 Bad Request on upgrade. Validation error.

Question
What’s the right key path for custom data in startChat? Docs don’t show much. Maybe the key name crmId is blocked? Or is the structure nested deeper? ID just vanishes.