Trunk Base URL Override - API Fails, UI Works

How’s the trunk base URL override supposed to work via the API? We’re trying to automate this across orgs, but the /api/v2/telephony/trunks/{trunkId} PUT call keeps failing with a 400 - “Invalid request body”. It’s just the baseUrls field - simple string array. The UI works fine, so it’s not a general permission issue.

Someone in the community mentioned this a couple weeks back, said they had to encode the URLs specifically. Tried URL encoding the base URLs, still no luck. Console is empty.

{
 "baseUrls": [
 "https://some.encoded.url",
 "https://another.encoded.url"
 ]
}

We’re on Zoom Contact Center, and the SDK versions are up to date. It’s a fresh trunk, not an import from another org. It’s like the API expects something different than what the UI is sending - or maybe the encoding has a different requirement?

  • It appears the trunk base URL payload expects a JSON array of strings, but the system’s parsing the array as a single string - apologies if this is obvious, I’m still learning the data structures. Try wrapping the base URL strings in quotes within the JSON array - something like ["https://example.com", "https://another.example.com"]. We’ve found that the conversational architecture relies on this consistent payload format for predictable containment.
2 Likes