Hi,
I just installed the API module and tried to add a conversation with the following javascript sample I found in the API documentation.
function newTicket(){
const url = new URL("https://hxsystem.se/api/conversations");
let headers = {
"X-FreeScout-API-Key": "xxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "application/hal+json",
}
let body = {
"type": "email",
"mailboxId": 1,
"subject": "Hi there",
"customer": {
"email": "mark@example.org"
},
"threads": [
{
"text": "This is the message from a user",
"type": "message"
}
],
"imported": true,
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
}
Problem is that it throws the following error: "message":"subject parameter is required"
What can cause this? I am trying to add a conversation from my localhost to my production, is that the issue?
Regards, Joakim
Hi,
I just installed the API module and tried to add a conversation with the following javascript sample I found in the API documentation.
Problem is that it throws the following error:
"message":"subjectparameter is required"What can cause this? I am trying to add a conversation from my localhost to my production, is that the issue?
Regards, Joakim