REST api no update work

Infos:

  • Used Zammad version: Version 5.2.x
  • Used Zammad installation type: package
  • Operating system: debian
  • Browser + version: chrome / curl

Expected behavior:

  • The title or group of a ticket is updated

Actual behavior:

  • old values ​​are retained

Steps to reproduce the behavior:

I us the curl cammonad:
curl -H “Authorization: Token token=TOKEN” -X PUT https://example.TLD.de/api/v1/tickets/31339 -d ‘{“title”: “No help for you”}’

Response:
{“id”:31339,“group_id”:3,“priority_id”:1,“state_id”:2,“organization_id”:2,“number”:“6831352”,“title”:"WG: trend SWM - …
but nothing changed

Same with postman an other tools.

Token Permissions:
image

Smells like you’re not using the API right.
Zammads API is an JSON api which is not reflected by your curl command. Also ensure that you have write permissions on the ticket in question.

A fitting curl command would be:

curl --location --request PUT 'https://example.com//api/v1/tickets/28' \
--header 'Authorization: Bearer <MY TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
   "title": "no help for you"
   }'

Technically --data-raw is not necessarily relevant, but that’s what postman generates.