That can be done by adding a group_names
key to the Headers field. Its value should be set to a comma separated list of group names. I’ll add an example of this to the topic.
The basic approach that’s used in this topic will work for any API request to Discourse.