How can I use API metabase to add a user to a permission group?

Hi! I need to create a script to add a metabase user into a permission group, but I don't find a endpoint that can help me do that.

I found this one below but I can't pass the permission group to add the user. Thanks!

  • name value must be a non-blank string.

POST /api/permissions/membership

Add a User to a PermissionsGroup . Returns updated list of members belonging to the group.

You must be a superuser to do this.

Hi @Gustavo1
Why can't you get it to work? Try posting what you're trying and the errors.
The best way to learn the API, is to just use Metabase while having your browser developer Network-tab open and looking at the request, and what data is being send/received.