API ticket creation example fails

I try to reproduce the example here: Tickets β€” Zammad documentation

The example has been pasted to postman, body type raw. Group and customer have been changed to valid values. Simple GET requests work fine.

{
   "title": "TEST TICKET",
   "group": "Juypter Hub",
   "customer": "this_mail_exists@ethz.ch",
   "article": {
      "subject": "TEST SUBJECT",
      "body": "I am a message!",
      "type": "note",
      "internal": false
   }
}

Response:

{
    "error": "The required value 'group_id' is missing.",
    "error_human": "The required value 'group_id' is missing."
}

I replaced group with group_id, with the ID I found in a ticket GET request, but without success.

Background

In the end, we want to create tickets as Shared Drafts, mails which should be created unattended by a service, and edited by a team before being sent to the customers.

Infos:

  • Used Zammad version: 5.2.3
  • Used Zammad installation type: source
  • Operating system: RHEL 8.6
  • Browser + version: postman

Can you get the group information in a response to /api/v1/groups/{id}?
Does the API-User have the correct rights on this group?

No, I can’t list the group information for the group id in question. I will contact the server admins and ask for the admin.groups permission for a test run. The ticket creation endpoint mentions ticket.agent permission only, but I will test and come back.

I mean, that the user for them you have the api key needs at least read rights on the given group. You have to set up those rights on the user (agent) config. I think, that you don’t need admin rights.

Zammad Groups

Sorry for wasting your time, my bad. I just found that a setting in Postman caused the problem. I sent the request body as raw, but let the type setting on text. Changing the type to JSON fixed the problem.

3 Likes

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