Data Action JSON parse error on Cognigy Profile Token query

Hitting /api/v2/external/contacts with a Cognigy profile token. The HTTP 200 response looks fine in Postman, but Architect throws a JSON parsing error on the output mapping. The payload has nested objects that aren’t flattening correctly.

{
“status”: “success”,
“data”: { “user_id”: “123” }
}

Any idea why the mapper chokes on this structure?

The issue is likely the nested structure. Architect’s JSON mapper expects flat key-value pairs or a specific array format for data actions. When the response wraps data in a data object, the mapper doesn’t know which field to extract unless you tell it explicitly.

Check your data action configuration. You need to set the rootPath or use a mapping expression to drill down. If you’re using the standard HTTP request, the response body is the whole JSON. You can’t just drop it into a variable that expects a string or number without parsing.

Try this in your Architect flow after the HTTP request:

// If using a script or expression mapping
response.data.user_id

Or, if you’re stuck in the visual mapper, add a rootPath of data in the data action settings. This flattens the first layer. The user_id should then be accessible directly. Make sure the content type is application/json in the request headers too. Sometimes missing headers cause the parser to treat the body as text, which breaks the JSON parsing step immediately after.

Also, check for invisible characters in the Postman response. Sometimes whitespace causes strict parsers to fail.