> 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/guardians.md).

# Guardians

## List a member's guardians

> Returns the parents and carers recorded against a member, including their contact details and which one is the primary contact.

```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"}}},"Guardian":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"is_emergency_contact":{"description":"IsEmergencyContact marks a guardian as an emergency contact. Independent of\nIsPrimary: a member may have several emergency contacts.","type":"boolean"},"is_primary":{"type":"boolean"},"last_name":{"type":"string"},"member_id":{"type":"string","format":"uuid"},"phone":{"type":"string"},"relationship":{"type":"string"},"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}/members/{member_id}/guardians":{"get":{"description":"Returns the parents and carers recorded against a member, including their contact details and which one is the primary contact.","tags":["guardians"],"summary":"List a member's guardians","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Member ID","name":"member_id","in":"path","required":true}],"responses":{"200":{"description":"The member's guardians","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Guardian"}}}}]}}}},"400":{"description":"A path parameter 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"}}}}}}}}}
```

## Add a guardian to a member

> Records a parent or carer for the member. Set \`is\_primary\` to mark them as the main point of contact. The created guardian 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"}}},"Guardian":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"is_emergency_contact":{"description":"IsEmergencyContact marks a guardian as an emergency contact. Independent of\nIsPrimary: a member may have several emergency contacts.","type":"boolean"},"is_primary":{"type":"boolean"},"last_name":{"type":"string"},"member_id":{"type":"string","format":"uuid"},"phone":{"type":"string"},"relationship":{"type":"string"},"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"}}},"CreateGuardianRequest":{"type":"object","required":["first_name","last_name"],"properties":{"email":{"type":"string"},"first_name":{"type":"string","maxLength":100,"minLength":1},"is_emergency_contact":{"type":"boolean"},"is_primary":{"type":"boolean"},"last_name":{"type":"string","maxLength":100,"minLength":1},"phone":{"type":"string","maxLength":50},"relationship":{"type":"string","maxLength":100}}}}},"paths":{"/v1/groups/{group_id}/members/{member_id}/guardians":{"post":{"description":"Records a parent or carer for the member. Set `is_primary` to mark them as the main point of contact. The created guardian is returned in `data`.","tags":["guardians"],"summary":"Add a guardian to a member","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Member ID","name":"member_id","in":"path","required":true}],"responses":{"201":{"description":"The created guardian","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Guardian"}}}]}}}},"400":{"description":"A path parameter 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"}}}},"422":{"description":"Validation failed; see error.fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGuardianRequest"}}},"description":"Guardian to create","required":true}}}}}
```

## Remove a guardian from a member

> Deletes a guardian record from the member. Returns \`204 No Content\` on success.

```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":{"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}/members/{member_id}/guardians/{guardian_id}":{"delete":{"description":"Deletes a guardian record from the member. Returns `204 No Content` on success.","tags":["guardians"],"summary":"Remove a guardian from a member","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Member ID","name":"member_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Guardian ID","name":"guardian_id","in":"path","required":true}],"responses":{"204":{"description":"Guardian removed"},"400":{"description":"A path parameter 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 such guardian for this member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Update a guardian

> Applies a partial update to a guardian. Only the fields present in the request body are changed. The updated guardian 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"}}},"Guardian":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"is_emergency_contact":{"description":"IsEmergencyContact marks a guardian as an emergency contact. Independent of\nIsPrimary: a member may have several emergency contacts.","type":"boolean"},"is_primary":{"type":"boolean"},"last_name":{"type":"string"},"member_id":{"type":"string","format":"uuid"},"phone":{"type":"string"},"relationship":{"type":"string"},"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"}}},"UpdateGuardianRequest":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string","maxLength":100,"minLength":1},"is_emergency_contact":{"description":"IsEmergencyContact is a pointer so an omitted field leaves the flag\nunchanged, while an explicit true/false writes through.","type":"boolean"},"is_primary":{"type":"boolean"},"last_name":{"type":"string","maxLength":100,"minLength":1},"phone":{"type":"string","maxLength":50},"relationship":{"type":"string","maxLength":100}}}}},"paths":{"/v1/groups/{group_id}/members/{member_id}/guardians/{guardian_id}":{"patch":{"description":"Applies a partial update to a guardian. Only the fields present in the request body are changed. The updated guardian is returned in `data`.","tags":["guardians"],"summary":"Update a guardian","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Member ID","name":"member_id","in":"path","required":true},{"schema":{"type":"string","format":"uuid"},"description":"Guardian ID","name":"guardian_id","in":"path","required":true}],"responses":{"200":{"description":"The updated guardian","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Guardian"}}}]}}}},"400":{"description":"A path parameter 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 such guardian for this member","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/UpdateGuardianRequest"}}},"description":"Fields to update","required":true}}}}}
```


---

# 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/guardians.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.
