Can not reply on tickets created by the API

  • Used Zammad version: latest
  • Used Zammad installation type: docker compose official repo
  • Operating system: debian
  • Browser + version: not relevant
  1. I’m creating a ticket using the API. This is the python code (nothing special imo):
def create_ticket(self, name, email, subject, body, belege):
    logging.debug(f"Creating ticket for {name} ({email} | {subject})")

    params = {
        "title": subject,
        "group": self.group,
        "customer": email,
        "article": {
            "subject": subject,
            "body": body,
            "type": "note",
            "internal": False,
            "content_type": "plain/text",
            "attachments": []
        }
    }

    for beleg in belege:
        attachment = {
            "filename": beleg[0],
            "mime-type": beleg[1],
            "data": beleg[2]
        }
        params["article"]["attachments"].append(attachment)


    try:
        self._create_customer_if_not_exists(name, email)
        ticket_data = self.client.ticket.create(params=params)
        ticket_id = ticket_data["id"]
        ticket_number = ticket_data["number"]
        logging.info(f"Successfully created ticket {ticket_id} (#{ticket_number})")
        return ticket_id, ticket_number
    except Exception as e:
        raise Exception("Could not create ticket in Zammad") from e
  1. This is how it looks like

Everything works fine except for the fact that there is no reply/antworten button. So I can just add a note, but I’m not able to send an email to the customer. Why is this the case? Is there something in the API call missing? It’s just in the tickets crated by the API.

I think this is because of your article type (payload.article.type). You can’t reply on a note. You could try “phone” or “web” instead this should work.

that makes totally sense and fixed the issue. Thank you!