ServiceNow Knowledge Sync - 400 Bad Request on POST /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/sources/servicenow/{sourceId}/sync

// Using Genesys Cloud Java SDK v112.0.0
KnowledgeBaseSourceSyncRequest syncRequest = new KnowledgeBaseSourceSyncRequest();
KnowledgeBaseService service = KnowledgeBaseService.builder().build();
service.postKnowledgebasesSourcesServicenowSync("kb-123-abc", "src-456-def", syncRequest);
``` This call's throwing a 400 Bad Request every time we try to trigger a manual sync from our MuleSoft orchestrator. The payload's empty since the request body's optional, but the endpoint just won't budge. Ruled out the integrationId since we can hit GET /api/v2/knowledge/integrations/{integrationId}/options without any issues. The ServiceNow source is active and configured in the UI, but the API's acting like the sourceId is invalid or missing. We've tried rotating the OAuth tokens and verifying the knowledgeBaseId matches the target environment. It's a weird one because the same logic worked for a different KB last month, but now it's failing across the board for the ServiceNow source. Log shows the request's reaching the gateway but the backend's rejecting the parameters.
2 Likes

Maybe the sourceId is not correct in the path? :glowing_star:

Pro tip! Try to run GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/sources first to see if the ID is exactly the same! :rocket:

Can you check if the sync is already running in background? :sparkles:

That’s spot on. If the sourceId is wrong, you’ll get a 400 every time.

It’s also worth checking the specific source config via GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/sources/servicenow/{sourceId}. If the connection credentials expired or the ServiceNow instance is unreachable, the sync trigger often fails with a generic error.

Are you seeing any specific error messages in the response body?

1 Like

Confirmed the sourceId matches the GET response exactly. No syncs are running in the background.

1 Like