I am getting the following error when trying to create a new conversation:
{"code":400,"status":"BAD_REQUEST","message":"Threading interval for this Conversation has been expired and thereby cannot be created when the first message is agent message."}
But the data I am sending doesn’t even have an agent message in:
The error message {"code":400,"status":"BAD_REQUEST","message":"Threading interval for this Conversation has been expired and thereby cannot be created when the first message is agent message."} suggests that there is a threading interval (a conversation timeout) in place, which governs when a new conversation can be started. Specifically, this error occurs when the system detects that the first message in a conversation is coming from an “agent” (or bot), which violates the rules of conversation threading.
From the data you’re sending, I can see that the conversation starts with a message from a bot ("actor_type": "bot"), followed by a message from a user. The system might be enforcing a rule that a conversation cannot begin with a bot message if a previous conversation is too old (thread expired). Even though you don’t have an explicit agent message (the actor is marked as “bot”), the system might be treating bot messages similarly to agent messages.
The ones that work, can you check whether those have ("actor_type": "bot" ) or not?
Also, have you tried testing the API on Postman? If not please do try and get back to us.