API Error 422 when creating tickets with type "email" via n8n

Infos:

  • Used Zammad version: Latest (6.x)
  • Used Zammad installation type: package
  • Operating system: Ubuntu
  • Browser + version: n8n workflow automation (API integration)

Expected behavior:

Creating tickets via API with article type “email” should create tickets with email type articles.

Actual behavior:

When creating tickets via API with article.type: “email”, getting error 422 “Sending an email without a valid recipient is not possible”. Have to use type “note” as workaround.

Steps to reproduce the behavior:

  1. Send POST request to /api/v1/tickets
  2. Include article with type: “email”, from, to, and sender fields
  3. Receive 422 error
  4. Change type to “note” - works fine

API payload example:
{
“title”: “Test”,
“group_id”: 2,
“customer_id”: “guess:customer@example.com”,
“article”: {
“type”: “email”,
“from”: “customer@example.com”,
“to”: “service@company.com”,
“sender”: “Customer”,
“body”: “Test content”,
“internal”: false
}
}

This seems related to GitHub issue #1909. Is type “web” or “note” the recommended approach for API ticket creation?

I think the message is clear :slight_smile: What are you trying?

your production log would tell you what tbe problem is.

The documentation hints you about inpersonating users, what you‘re gonna do if you‘re adding tickets as someone else that is not you. Tickets — Zammad System Documentation documentation