Java Media API 400 on vocab update region mismatch

HTTP 400 Bad Request: invalid_region_id.

Trying to update vocab for us-east-1 via mediaApi.postVocabulary. The Java SDK bombs. Token has media:write and media:read. Docs don’t list valid region strings. Code looks like VocabularyBody body = new VocabularyBody().region("us-east-1").name("custVocab"); platformClient.getMediaApi().postVocabulary(body);.

Getting a 403 on profanity filter POST too. Region enum looks incomplete.

VocabularyBody body = new VocabularyBody()
 .name("custVocab")
 .locale("en-US")
 .type("PHRASE_LIST");
platformClient.getMediaApi().postVocabulary(body);

The REGION parameter rejects standard external strings. The Media API expects the internal UPPERCASE identifier or nothing at all. Leaving it blank defaults to the TENANT_REGION automatically. You’ll get a 400 if the SDK tries to push a lowercase variant. Drop the .region() call completely.

The 403 on the profanity filter isn’t related to routing. It’s a SCOPE mismatch. media:write doesn’t cover profanity list endpoints. You’ll need media:profanity:write added to the token payload. Check the OAuth scope list in the developer console. The docs leave that out.

Keep the LOCALE field explicit. Missing it triggers a silent fallback that breaks the VOCABULARY sync. Run the PATCH again without the region override. The headers usually show the actual expected enum.