hey support - getting an error with http api "failed to parse body input" - i've watched the video on that from october, still not working for me
here's my clay table https://app.clay.com/workspaces/31186/workbooks/wb_7apanhhz4Qo9/tables/t_jNNu2aCVW8yd/views/gv_U3wCcAyYH23d last column
passing some Zenrows JSON into the API call - maybe i need to escape the jSON first to send it?
The "failed to parse body" error typically occurs when there's incorrect formatting in the Body section of your HTTP API enrichment. Here's how to fix it:1. Ensure all text strings are enclosed in double quotes 2. Remove any extra commas at the end of lines 3. Check for proper JSON formattingFor example:Wrong format::LBKS{LBKSname:: John,age: 30,}Correct format::LBKS{LBKS"name":: "John","age": 30}When using dynamic columns, remember to:** Include quotes around dynamic column tags for string values ** Leave number values without quotes (unless they have trailing zeros) * If combining plain text with dynamic column tags, create a Formula column firstIf you're still having trouble, try pasting your data into a JSON validator like JSONLint to spot any formatting issues. Sources: FAQ: Why am I seeing the "failed to parse body" error when using the HTTP API enrichment? HTTP API with JWT Authentication - Clay University
When sending JSON data in your API requests, you need to follow proper JSON formatting rules:** For strings, use quotes (e.g., "name": "Sam") ** For booleans and numbers, do not use quotes (e.g., "age": 30)When using dynamic variables with /column references, follow the same rules:** Include quotes for string values ** Skip quotes for number values * Exception: Use quotes for numbers with trailing zeros (e.g., "0004") Source: HTTP API with JWT Authentication - Clay University
i have all that set up per those rules and still it is erroring out
Here's how to fix the "failed to parse body" error in your HTTP API call:1. Ensure all text strings are enclosed in double quotes. 2. Check these common issues: • Verify all keys are properly separated by commas • Remove any trailing commas at the end of objects • Watch for extra spaces, colons, and brackets • Look for hidden characters by pasting into a text editor 3. When using dynamic column values: • Keep keys in quotes • For string values, include quotes • For number values, exclude quotes (unless they have leading zeros)For a quick validation, try pasting your JSON into JSONLint to spot any formatting issues. Sources: FAQ: Why am I seeing the "failed to parse body" error when using the HTTP API enrichment? HTTP API with JWT Authentication - Clay University
can you share screenshot of input body?
here you go sir
The HTTP API body should be entered in JSON format. Here's how to format it::LBKS{"email":: "sam@clay.com", "name": "Sam"}When using column tokens in the body, keep the key in quotes but don't wrap the value in quotes::LBKS{"email":: ##{{email field}}, "name": ##{{name field}}} Source: HTTP API with Clay
The content is not good, I guess you are passing the whole data returned by zenrows as an input. Try adding the actual content returned by zenrows, it should be under body or something
i take individual JSON objects inside the payload and it still returns an error let me show you
I apologize for the confusion, and I appreciate your feedback; we'll look into improving our content processing to better serve your needs.
To resolve the 'failed to parse body' error, here are the key steps to ensure proper JSON formatting:1. Always use double quotes around your keys and string values: • Correct: "name": "John" • Incorrect: name: John 2. Follow these formatting rules: • Surround string values with quotes • Leave numbers and booleans without quotes • Remove trailing commas • Ensure proper bracket placementIf you're still having trouble:** Copy your JSON into a text editor to check for hidden characters ** Use a JSON validator like JSONLint to verify the format * For dynamic values using /column, remember to keep quotes for strings but not for numbers (unless they have trailing zeros)Here's a correct example::LBKS{LBKS"name":: "John","age": 30} Sources: FAQ: Why am I seeing the "failed to parse body" error when using the HTTP API enrichment? HTTP API with JWT Authentication - Clay University
here you go
its a list
so you can't pass lists
try passing a single object
it has to be a single key
yes
To resolve the 'failed to parse body' error when passing a JSON object in the HTTP API, make sure to follow these formatting rules:1. Enclose all string values and keys in double quotes 2. Don't use quotes for numbers or boolean values (except for numbers with trailing zeros) 3. Use proper comma separation between key-value pairs 4. Remove any trailing commasHere's the correct format::LBKSLBKS```LBKS{ "name":: "John", "age": 30, "email": "/column" }```For dynamic variables using /column references, remember to:** Keep quotes around dynamic string values ** Don't use quotes for dynamic number values * Use quotes for numbers with trailing zeros (like "0004")If you're still having trouble, try pasting your JSON into a validator like JSONLint to check for formatting issues. Sources: FAQ: Why am I seeing the "failed to parse body" error when using the HTTP API enrichment? HTTP API with JWT Authentication - Clay University HTTP API - Clay University
Fantastic! I'm here if you need any further assistance with our app or services.
so how would i be able to send a larger payload like a list - is there no way to do that in clay?
When sending payloads through Clay's HTTP API, please note that there is a size limit of 100KB per payload. Additionally, webhooks are limited to processing up to 10 records per second, with a maximum burst capacity of 20 records. Source: Import Data to Clay Using Webhooks
ahhh understood
thats likely why then thanks
I'm glad I could help clarify that for you, and I'm here if you have any other questions about our service.