How to add an update to a subitem via API

I am creating subitems via API calls. Now I want to include comment text as an Update. It works fine in the playground so I know it’s supported. But I keep getting an 500 response.

{"query": "mutation { create_update (item_id: 9876543210, body: "TEST") { ID } }"}

What am I doing wrong here?

Hello @jsararas,

This works well for me:

mutation {
  create_update(item_id: 1234567890, body: "TEST") {
    id
  }
}

(id instead of ID)

You say the same thing works in the Playground and not from you script?

Would you be able to send the full script you are using without adding any sensitive information?

Thanks @Matias.Monday, I realized I was not escaping properly:
body: "TEST" needed to be body: \"TEST\" and it works now. But as you mentioned ID instead of id would have also broken it!

Hello @jsararas,

I am glad you found the source of the issue!

Let us know if you have any questions or issues in the future :grin:

Cheers,
Matias