State issues with Zammad API

Hello,

I wish to use Zammad’s API to create tickets from an MS FORMS via POWERAUTOMATE with the following JSON:

{
“title”: “TEST”,
“type”: “Request”,
“state_id”: 1,
“group_id”: 10,
“customer_id”: “guess:test@mail”,
“article”: {
“to”: “test@mail”,
“subject”: “TEST”,
“body”: “I am a message!”,
“type”: “email”,
“internal”: “false”
}
}

The ticket is indeed created but it is created with the status “Open” and not “New” despite the variable: “state_id”: 1,

In the POSTGRESQL “histories” table, I can see that it was created with the correct status but was automatically changed to “Open”.

I have disabled all the “CoreWorkflow” and “Triggers” to make sure they were not causing any issues.

Zammad version : 6.2.0-1711375558.ce1240f3.jammy
OS For Zammad : Ubuntu 22.04

Hi @alrik.vidal. Please use the ticket history in the GUI.

Your request is missing the sender, then it works as expected:

{
  "title": "TEST",
  "type": "Request",
  "state_id": 1,
  "group_id": 1,
  "customer_id": "guess:test@mail",
  "article": {
    "sender": "Customer",
    "to": "test@mail",
    "subject": "TEST",
    "body": "I am a message!",
    "type": "email",
    "internal": "false"
  }
}

Hi, and thanks !!

It works

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.