Update Group Permissions

Use this endpoint to manage a group's members, layers, projects and forms. To change one of the permission properties of a group, you will need to include the correct type slug in the body of your request. Use this table to find out which slug to use in your request:

Desired actionType slug
Update a group's membersgroup_members
Update a group's projectsgroup_projects
Update a group's layersgroup_layers
Update a group's formsgroup_forms

The body of your request should contain these properties as required:

PropertyTypeRequiredDescription
typestringyesThe type of update (reference the type slug table above)
group_idstringyesThe group ID
addarray of stringsnoThe collection of entities to add to the group
removearray of stringsnoThe collection of entities to remove from the group

JSON Body Examples

In these examples, you can add and remove permissions in the same request by filling the add or remove array properties with multiple ids, separated by commas. Please keep in mind that if you are changing a group permission and reference multiple members, layers, projects or forms in the add or remove property of your request body, and there is an error with adding or removing one of them, the entire request will fail, and none of the other additions or removals will be successful.

Replace double-bracketed strings with your own variables where applicable.

{
    "change": {
        "type": "group_members",
        "group_id": "{{group_id}}",
        "add": [
            "81ad0f14-35a8-4be0-8ca0-83ea93947987",
          	"{{another membership id}}"
        ],
        "remove": []
    }
}
{
    "change": {
        "type": "group_layers",
        "group_id": "{{group_id}}",
        "add": [
            "dc37b767-a160-47d3-ac58-b11432e5860d",
          	"a765a9ef-e233-400d-889d-4f81eb31d8b9",
          	"{{another layer id}}"
        ],
        "remove": []
    }
}
{
    "change": {
        "type": "group_forms",
        "group_id": "{{group_id}}",
        "add": [
            "4d6f87d2-0dc3-4eb6-a065-9ac595173424",
          	"{{another form id}}}"
        ],
        "remove": []
    }
}
{
    "change": {
        "type": "group_members",
        "group_id": "{{group_id}}",
        "add": [],
        "remove": [
            "81ad0f14-35a8-4be0-8ca0-83ea93947987",
          	"{{another membership id}}"
        ]
    }
}
Language
Authorization
Header
Click Try It! to start a request and see the response here!