> For the complete documentation index, see [llms.txt](https://developers.trooply.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.trooply.co.uk/groups.md).

# Groups

## List groups

> Returns a paginated list of the Scout groups the authenticated caller can access. Results are ordered by creation time. Use the \`page\` and \`per\_page\` query parameters to page through large groups; the total count is reported in \`meta.total\`.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"Group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_place":{"type":"string"},"name":{"type":"string"},"parent_group_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tsa_group_id":{"description":"TSAGroupID is the linked TSA catalogue group's UUID — the key the public\n/v1/tsa/groups/{id}/sections endpoint accepts. Nil for unclaimed groups.","type":"string","format":"uuid"},"tsa_group_number":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}}}},"paths":{"/v1/groups":{"get":{"description":"Returns a paginated list of the Scout groups the authenticated caller can access. Results are ordered by creation time. Use the `page` and `per_page` query parameters to page through large groups; the total count is reported in `meta.total`.","tags":["groups"],"summary":"List groups","parameters":[{"schema":{"type":"integer","default":1,"minimum":1},"description":"Page number, 1-based","name":"page","in":"query"},{"schema":{"type":"integer","default":20,"maximum":100,"minimum":1},"description":"Items per page","name":"per_page","in":"query"}],"responses":{"200":{"description":"Paginated list of groups","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create a group

> Creates a new Scout group. Supply \`parent\_group\_id\` to nest the new group beneath an existing one (for example a section group within a district); omit it to create a top-level group. The newly created group is returned in \`data\`.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"Group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_place":{"type":"string"},"name":{"type":"string"},"parent_group_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tsa_group_id":{"description":"TSAGroupID is the linked TSA catalogue group's UUID — the key the public\n/v1/tsa/groups/{id}/sections endpoint accepts. Nil for unclaimed groups.","type":"string","format":"uuid"},"tsa_group_number":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}},"CreateGroupRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":200,"minLength":1},"parent_group_id":{"type":"string","format":"uuid"}}}}},"paths":{"/v1/groups":{"post":{"description":"Creates a new Scout group. Supply `parent_group_id` to nest the new group beneath an existing one (for example a section group within a district); omit it to create a top-level group. The newly created group is returned in `data`.","tags":["groups"],"summary":"Create a group","responses":{"201":{"description":"The created group","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}]}}}},"400":{"description":"Malformed JSON body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed; see error.fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}},"description":"Group to create","required":true}}}}}
```

## Get a group

> Returns a single Scout group by its unique identifier.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"Group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_place":{"type":"string"},"name":{"type":"string"},"parent_group_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tsa_group_id":{"description":"TSAGroupID is the linked TSA catalogue group's UUID — the key the public\n/v1/tsa/groups/{id}/sections endpoint accepts. Nil for unclaimed groups.","type":"string","format":"uuid"},"tsa_group_number":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}}}},"paths":{"/v1/groups/{group_id}":{"get":{"description":"Returns a single Scout group by its unique identifier.","tags":["groups"],"summary":"Get a group","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"The requested group","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}]}}}},"400":{"description":"group_id is not a valid UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No group with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Update a group

> Applies a partial update to a group. Only the fields present in the request body are changed; omitted fields are left untouched. The updated group is returned in \`data\`.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"Group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_place":{"type":"string"},"name":{"type":"string"},"parent_group_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tsa_group_id":{"description":"TSAGroupID is the linked TSA catalogue group's UUID — the key the public\n/v1/tsa/groups/{id}/sections endpoint accepts. Nil for unclaimed groups.","type":"string","format":"uuid"},"tsa_group_number":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}},"UpdateGroupRequest":{"type":"object","properties":{"meeting_place":{"type":"string","maxLength":500},"name":{"type":"string","maxLength":200,"minLength":1},"parent_group_id":{"type":"string","format":"uuid"}}}}},"paths":{"/v1/groups/{group_id}":{"patch":{"description":"Applies a partial update to a group. Only the fields present in the request body are changed; omitted fields are left untouched. The updated group is returned in `data`.","tags":["groups"],"summary":"Update a group","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"The updated group","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}}}]}}}},"400":{"description":"group_id is not a valid UUID, or malformed JSON body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No group with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed; see error.fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupRequest"}}},"description":"Fields to update","required":true}}}}}
```

## List child groups

> Returns the direct child groups nested immediately beneath the given group. Only one level is returned; call again on a child to walk deeper.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"Group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_place":{"type":"string"},"name":{"type":"string"},"parent_group_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tsa_group_id":{"description":"TSAGroupID is the linked TSA catalogue group's UUID — the key the public\n/v1/tsa/groups/{id}/sections endpoint accepts. Nil for unclaimed groups.","type":"string","format":"uuid"},"tsa_group_number":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}}}},"paths":{"/v1/groups/{group_id}/children":{"get":{"description":"Returns the direct child groups nested immediately beneath the given group. Only one level is returned; call again on a child to walk deeper.","tags":["groups"],"summary":"List child groups","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Parent group ID","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"Direct child groups","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}]}}}},"400":{"description":"group_id is not a valid UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No group with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.trooply.co.uk/groups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
