Predictive outbound campaign rotating JWKS keys mid-batch on Express listener

Problem
GC sits at 2024-12.960.0. The outbound dialer campaign just switched to predictive mode. Queue’s doing jack all while the dialer burns through licenses. Express middleware keeps dropping outbound.call.disposition events. JWT validation passes on the first batch, but the second wave throws a signature mismatch. It’s weird because the payload looks fine on the surface, yet the campaignId keeps shifting into a nested object instead of sitting at the root. Console logs show the Express router hitting the route, but the request body comes back empty after the third retry.

Code

app.post('/gc/outbound', express.json(), (req, res) => {
 const token = req.headers['authorization'];
 const payload = jwt.verify(token, publicKey, { algorithms: ['RS256'] });
 console.log(payload.eventType, payload.campaignId);
 res.status(200).end();
});

Error
JsonWebTokenError: invalid signature on the second batch. First batch logs outbound.call.disposition and c_88a7b2. Second batch prints undefined and undefined. Request timeout hits after 3s.

Question
Predictive mode batching seems to rotate the signing keys mid-campaign. Does the WebSocket API cache the JWKS endpoint differently. Standard webhook delivery doesn’t seem to rotate keys this aggressively. Leaving the middleware to timeout on the next wave.