PATCH /api/v2/architect/trunkgroups throwing 422 on BYOC failover update

Pushed a script to update the failover priority on the Ohio BYOC trunk group via the Platform API. Endpoint is PATCH /api/v2/architect/trunkgroups/{id}. Running against us-east-1 prod, Architect v2024.3.1. The goal was just to bump the secondary Twilio trunk to priority 1 since Bandwidth has been timing out on keepalives lately. Script uses the official Python SDK v3.4.2, standard bearer auth. Request body looks clean.

It’s throwing a 422 Unprocessable Entity immediately. Response payload points to the failover_config object. Something about carrier_type expecting a string but receiving null. Weird, because the trunk group was created through the UI months ago and never touched. The validation error doesn’t match the v2 schema docs. Docs say failover_config only needs enabled and priority.

Tried stripping the body down to just {"failover_config": {"enabled": true, "priority": 1}}. Same 422. Swapped to raw curl just to rule out SDK quirks. Nothing changed. The Ohio pool has fifteen trunks total, half are BYOC, half are native. Native trunks update fine with the exact same payload. BYOC ones choke. Maybe the carrier-specific quirks are bleeding into the API layer now. Logs show the request hits the gateway but drops at the validation layer before touching the trunk store. Script’s doing jack all but throwing validation errors. Tried pulling the full trunk object via GET first. Payload comes back clean, no hidden carrier_type field. Updated the SDK to v3.5.0 just in case. Still chokes on the same validation rule.

{
 "message": "Validation failed",
 "details": [
 {
 "field": "failover_config.carrier_type",
 "code": "REQUIRED",
 "description": "Field is required for BYOC trunk groups"
 }
 ]
}

Schema doc for v2 definitely doesn’t list that field anywhere.