ServiceNow Table API 400 Bad Request on SMS Conversation Start

Status 400 Bad Request returned by ServiceNow Table API via Genesys Cloud Data Action when triggered by SMS conversation start. Payload validated against SNOW docs; fields map correctly. Tested via Postman with identical JSON structure-successful creation. Verified webhook signature and OAuth token validity. Architect flow uses ‘Create ServiceNow Record’ action with static mapping. No logs in ServiceNow indicating schema mismatch. Is there a specific header requirement for digital channel triggers that differs from manual webhook invocations?

The documentation actually says ServiceNow requires the Accept header set to application/json explicitly, even if the body is valid.

"headers": {
 "Accept": "application/json",
 "Content-Type": "application/json"
}

Twilio didn’t care about that but GC Data Actions do.

This looks like a header issue, but check the Content-Type value in the Data Action too. ServiceNow is strict about application/json. If you’re sending form-encoded data by accident, it’ll 400. Also, make sure the OAuth token scope includes write.

3 Likes

The documentation actually says the Accept header is mandatory for SNOW table APIs, which explains the 400. see support article kb-9921 for the exact header requirements.

Check your payload structure. ServiceNow Table APIs are strict about the sys_id field on updates versus creates. If you’re sending an empty object or missing the target table identifier, it’ll 400 immediately. The Data Action might be stripping nested fields if the mapping isn’t flat.

try this minimal config for the Data Action:

{
 "method": "POST",
 "url": "{{env.SNOW_INSTANCE}}/api/now/table/incident",
 "headers": {
 "Authorization": "Bearer {{env.SNOW_TOKEN}}",
 "Accept": "application/json",
 "Content-Type": "application/json"
 },
 "body": {
 "short_description": "{{trigger.sms_message.text}}",
 "caller_id": "{{trigger.user.id}}"
 }
}

also ensure the trigger payload from the SMS conversation actually contains the text field. sometimes the body is null on initial start events. see kb-8842 for header requirements.