Conversation API

Hi,
I am new to fresh-chat and I am trying to create a conversation using conversation post API.
My payload is
{
“status”: “new”,
“messages”: [
{
“message_parts”: [{
“text”: {
“content”: “Hii! Need help in receiving the refund.”
}
}],

    "channel_id": "f3bd0985-edf1-4927-8819-8a934637bed4",
    "message_type": "normal",
    "actor_type": "Agent",
    "actor_id":"578786f8-e444-4b9d-8958-8b3b7f5ebd4f"
  }
],
"channel_id": "f3bd0985-edf1-4927-8819-8a934637bed4",

"users": [{ 
  "id": "79fb6610-707f-4314-85db-9eb0e91f9698"
}]

}

I am getting this error:
{
“code”: 400,
“status”: “BAD_REQUEST”,
“message”: “Invalid actor_type passed”
}
Can somebody please help.

Hi @vijay_kumar_chauhan ,
The problem may be “Agent” written in capital letters.

On my side this curl works properly:

curl --location 'https://domain.freshchat.com/v2/conversations/ed79580d-da4a-445a-8904-5f6dfc2fd4a5/messages' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ***' \
--data '{
    "status": "new",
    "message_parts": [
        {
            "text": {
                "content": "WABALABADUBDUB!"
            }
        }
    ],
    "message_type": "normal",
    "actor_type": "agent",
    "actor_id": "055c4a04-d815-47a2-a239-1766b679a5b5",
    "users": [
        {
            "id": "59ad32a2-e0c3-4569-adbb-9235f9477565"
        }
    ]
}'