API Create Conversation error
nfactorialbcn-arnau opened this issue · 2 comments
Hello.
I want to use the API to create forms in a web and then insert the information directly in FreeScout.
All the API works fine, except one, PUT api/conversations
When i send this petition to the API api/conversations (PUT)
{
"type": "email",
"mailboxId": 1,
"subject": "hola hola hola",
"customer": {
"email": "test@test.net"
},
"threads": [
{
"text": "This is the message from a customer",
"type": "customer",
"customer": {
"email": "test@test.net",
"firstName": "Joan"
}
}
]
"status": "active"
}
The answer is Error 400
{
"message": "Error occurred",
"_embedded": {
"errors": [
{
"path": "subject",
"message": "`subject` parameter is required",
"source": "JSON"
}
]
}
}
Can you review this issue?
Thanks.
PHP version: PHP 8.2.20
FreeScout version: 1.8.145
Database: MySQL / PostgreSQL Mysql (10.6.18-MariaDB-0ubuntu0.22.04.1)
Are you using CloudFlare: Yes / No: No
Are you using non-official modules: Yes / No: NO
API & Webhooks version:: 1.0.78
We've double checked it and it works fine.
Make sure you are actually using PUT method. Also try first some simple request:
{
"subject": "Test"
}
The problem was "," after "subject": "hola hola hola",
I deleted it and put again the "," and works.