> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/groups.md).

# Groups

## GET /V2/{tenantVarCode}/groups

> Returns groups for the tenant

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Groups"}],"paths":{"/V2/{tenantVarCode}/groups":{"get":{"tags":["Groups"],"summary":"Returns groups for the tenant","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}}}}}},"components":{"schemas":{"Group":{"required":["GroupName"],"type":"object","properties":{"GroupId":{"type":"string","description":"A unique identifier of the group","nullable":true},"GroupName":{"minLength":1,"type":"string","description":"A string with name of the group"},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true}},"additionalProperties":false,"description":"Groups are used to apply event notifications, send messages or assign check-in schedules to multiple devices using a single action."}}}}
```

## POST /V2/{tenantVarCode}/groups

> Creates a new group

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Groups"}],"paths":{"/V2/{tenantVarCode}/groups":{"post":{"tags":["Groups"],"summary":"Creates a new group","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/Group"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Group"}},"text/plain":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/Group"}},"text/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Group"}},"text/xml":{"schema":{"$ref":"#/components/schemas/Group"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/Group"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Group":{"required":["GroupName"],"type":"object","properties":{"GroupId":{"type":"string","description":"A unique identifier of the group","nullable":true},"GroupName":{"minLength":1,"type":"string","description":"A string with name of the group"},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true}},"additionalProperties":false,"description":"Groups are used to apply event notifications, send messages or assign check-in schedules to multiple devices using a single action."}}}}
```

## GET /V2/{tenantVarCode}/groups/{groupId}

> Returns group

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Groups"}],"paths":{"/V2/{tenantVarCode}/groups/{groupId}":{"get":{"tags":["Groups"],"summary":"Returns group","operationId":"GetGroup","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","description":"Group Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/Group"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Group"}},"text/plain":{"schema":{"$ref":"#/components/schemas/Group"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/Group"}},"text/json":{"schema":{"$ref":"#/components/schemas/Group"}},"text/xml":{"schema":{"$ref":"#/components/schemas/Group"}}}}}}}},"components":{"schemas":{"Group":{"required":["GroupName"],"type":"object","properties":{"GroupId":{"type":"string","description":"A unique identifier of the group","nullable":true},"GroupName":{"minLength":1,"type":"string","description":"A string with name of the group"},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true}},"additionalProperties":false,"description":"Groups are used to apply event notifications, send messages or assign check-in schedules to multiple devices using a single action."}}}}
```

## PUT /V2/{tenantVarCode}/groups/{groupId}

> Updates group

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Groups"}],"paths":{"/V2/{tenantVarCode}/groups/{groupId}":{"put":{"tags":["Groups"],"summary":"Updates group","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","description":"Group Id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/Group"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Group"}},"text/plain":{"schema":{"$ref":"#/components/schemas/Group"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/Group"}},"text/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Group"}},"text/xml":{"schema":{"$ref":"#/components/schemas/Group"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/Group"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Group":{"required":["GroupName"],"type":"object","properties":{"GroupId":{"type":"string","description":"A unique identifier of the group","nullable":true},"GroupName":{"minLength":1,"type":"string","description":"A string with name of the group"},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true}},"additionalProperties":false,"description":"Groups are used to apply event notifications, send messages or assign check-in schedules to multiple devices using a single action."}}}}
```

## DELETE /V2/{tenantVarCode}/groups/{groupId}

> Deletes group

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Groups"}],"paths":{"/V2/{tenantVarCode}/groups/{groupId}":{"delete":{"tags":["Groups"],"summary":"Deletes group","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","description":"Group Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```
