Summary
I’m working to build out a java client for Zendesk. When I aim to emulate the documented api calls, I am running into some errors that don’t make sense to me. Is creating a category and its translations in the same API call not supported?
Test setup context: I’ve enabled both the en-us and fr locales.
Below is my debugging to try and figure out how to properly support this.
Calling the same api call as the docs
in the docs, we read that we can create a category AND its translations at the same time.
# You can also specify multiple translations for the new category:
curl https://{subdomain}.zendesk.com/api/v2/help_center/categories \ -d '{"category": {"position": 2, "translations": \ [{"locale": "en-us", "title": "Super Hero Tricks", \ "body": "This category contains a collection of Super Hero tricks"}, \ {"locale": "fr", "title": "Trucs Super Heros", \ "body": "Cette categorie contient une collection de trucs super heros"}]}}' \ -v -u {email_address}/token:{api_token} -X POST -H "Content-Type: application/json"So, my client attempts to emulate this call with this json:
{
"category": {
"name": "jackal",
"position": 0,
"translations": [
{
"locale": "fr",
"title": "Who's President of the United States in 1985? Ronald Reagan? The actor? Ha! Then whose vice president? Jerry Lewis?"
},
{
"locale": "en-us",
"title": "You don't get to live a bad life and have good things happen to you."
}
]
}
}Then the error response states that I’m missing a default locale.
{
"errors": "Validation failed: Content default translation locale is invalid, Content default translation locale cannot be blank, Content translations locale is invalid, Content translations locale cannot be blank, Translations is invalid"
}Calling API with requested default locale, I get a 503 error:
19:36:52.821 [default-eventLoopGroup-1-2] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP POST to https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Authorization: *MASKED*
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - host: d3v-peanutbutterunicorn.zendesk.com
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Request Body
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"name":"squirrel","locale":"en-us","position":0,"translations":[{"locale":"fr","title":"Look, you're not gonna be picking a fight, Dad... Dad-Dad-Daddy-O."},{"locale":"en-us","title":"I wish things were different… but it weren’t us who changed."}]}}
19:36:52.822 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:36:53.275 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - HTTP Client Response Received (503) for Request: POST https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:36:53.275 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - date: Tue, 21 Apr 2026 01:36:53 GMT
19:36:53.276 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - content-type: application/json; charset=utf-8
19:36:53.279 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:36:53.279 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"message":"Service is temporarily unavailable because of a concurrent update. Please try again."}Calling API with requested default locale as well as the source locale, I get a 503 error:
- Sending HTTP POST to https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Authorization: *MASKED*
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - host: d3v-peanutbutterunicorn.zendesk.com
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Request Body
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"name":"beaver","locale":"en-us","position":0,"source_locale":"en-us","translations":[{"locale":"fr","title":"This is all wrong. I don't know what it is. But when I kiss you, it's like I'm kissing... my brother. I guess that doesn't make any sense, does it?"},{"locale":"en-us","title":"Lack of something to feel important about is almost the greatest tragedy a man may have."}]}}
19:26:28.102 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:26:28.291 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - HTTP Client Response Received (503) for Request: POST https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:26:28.291 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - date: Tue, 21 Apr 2026 01:26:28 GMT
19:26:28.291 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - content-type: application/json; charset=utf-8
19:26:28.294 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:26:28.294 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"message":"Service is temporarily unavailable because of a concurrent update. Please try again."}
19:26:28.294 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
If I Make the category and THEN create the translations, everything’s fine:
19:45:34.279 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[4]: Dispatching to connection Http2PoolEntry[1, pool=Pool[default-eventLoopGroup-1-2]]
19:45:34.300 [default-eventLoopGroup-1-2] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP POST to https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Authorization: *MASKED*
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - host: d3v-peanutbutterunicorn.zendesk.com
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Request Body
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"name":"serval","locale":"en-us","position":0}}
19:45:34.301 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:34.808 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - HTTP Client Response Received (201) for Request: POST https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories
19:45:34.809 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - date: Tue, 21 Apr 2026 01:45:35 GMT
19:45:34.809 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - content-type: application/json; charset=utf-8
19:45:34.817 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - zendesk-service: help-center
19:45:34.817 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - nel: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - server: cloudflare
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - cf-ray: 9ef8b5c76f615303-SLC
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - x-http2-stream-id: 9
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - transfer-encoding: chunked
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"id":51001135208595,"url":"https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/en-us/categories/51001135208595.json","html_url":"https://d3v-peanutbutterunicorn.zendesk.com/hc/en-us/categories/51001135208595-serval","position":0,"created_at":"2026-04-21T01:45:35Z","updated_at":"2026-04-21T01:45:35Z","name":"serval","description":null,"locale":"en-us","source_locale":"en-us","outdated":false}}
19:45:34.818 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:34.832 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Http2PoolEntry[1, pool=Pool[default-eventLoopGroup-1-2]] became available x1
19:45:34.847 [ForkJoinPool-1-worker-3] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[5]: Starting dispatch, preferred pool null
19:45:34.847 [ForkJoinPool-1-worker-3] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[5]: Scheduling dispatch on Pool[default-eventLoopGroup-1-4]
19:45:34.848 [default-eventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[5]: Attempting dispatch on Pool[default-eventLoopGroup-1-4]
19:45:34.850 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[5]: Attempting dispatch on Pool[default-eventLoopGroup-1-2]
19:45:34.850 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - PendingRequest[5]: Dispatching to connection Http2PoolEntry[1, pool=Pool[default-eventLoopGroup-1-2]]
19:45:34.852 [default-eventLoopGroup-1-2] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP PUT to https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories/51001135208595
19:45:34.852 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
19:45:34.852 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Authorization: *MASKED*
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - host: d3v-peanutbutterunicorn.zendesk.com
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Request Body
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"name":"serval","locale":"en-us","position":0,"translations":[{"locale":"fr","title":"I noticed your band is on the roster for the dance auditions after school today. Why even bother, McFly? You don't have a chance. You're too much like your old man. No McFly ever amounted to anything in the history of Hill Valley!"},{"locale":"en-us","title":"Be loyal to what matters."}]}}
19:45:34.853 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:35.338 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - HTTP Client Response Received (200) for Request: PUT https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/categories/51001135208595
19:45:35.339 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - date: Tue, 21 Apr 2026 01:45:35 GMT
19:45:35.339 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - content-type: application/json; charset=utf-8
19:45:35.341 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - server: cloudflare
19:45:35.341 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - cf-ray: 9ef8b5cadb385303-SLC
19:45:35.341 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - x-http2-stream-id: 11
19:45:35.341 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - transfer-encoding: chunked
19:45:35.342 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
19:45:35.342 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:35.342 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"category":{"id":51001135208595,"url":"https://d3v-peanutbutterunicorn.zendesk.com/api/v2/help_center/en-us/categories/51001135208595.json","html_url":"https://d3v-peanutbutterunicorn.zendesk.com/hc/en-us/categories/51001135208595-serval","position":0,"created_at":"2026-04-21T01:45:35Z","updated_at":"2026-04-21T01:45:35Z","name":"serval","description":null,"locale":"en-us","source_locale":"en-us","outdated":false}}
19:45:35.342 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
19:45:35.344 [default-eventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Http2PoolEntry[1, pool=Pool[default-eventLoopGroup-1-2]] became available x1
