Hi @cpv,
Greetings from Freshworks community. Could you please let me know what is the response code received ? Please use Postman to use the same payload to check the response code and also, Please make sure you pass all the mandatory ticket fields that are set under Admin > Ticket fields which are required during ticket creation.
It sounds like you're trying to validate a JSON string for creating a ticket, but you're running into errors. If you're looking to add a specific key to your JSON and need help validating it online, here’s a step-by-step approach you can follow:
-
Fix JSON Format: Ensure your JSON format is correct. JSON should have key-value pairs and be enclosed in curly braces {}
. For example:
json
CopyEdit
{ "ticket_id": "12345", "subject": "Issue with login", "priority": "High", "description": "Unable to log into the system", "created_at": "2025-04-21T10:30:00" }
-
Add New Key: If you need to add a new key (for example, "status": "open"
), it should be done like this:
json
CopyEdit
{ "ticket_id": "12345", "subject": "Issue with login", "priority": "High", "description": "Unable to log into the system", "created_at": "2025-04-21T10:30:00", "status": "open" }
-
Validate the JSON: You can use an online JSON validator like:
-
Fix Errors: If you see any errors when you validate the JSON, the validator will usually point out exactly what’s wrong (like missing commas, incorrect key-value pairs, or extra characters). Make sure everything is formatted correctly.
-
Check API Expectations: If you're submitting this JSON to an API (like for ticket creation), make sure the keys and their data types match what the API expects. Sometimes a missing key or invalid value type can cause errors.
If you want, you can share the exact JSON string and the error message you're getting, and I can help you troubleshoot further!