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

# Join Requests

## List open join requests

> Lists the pending and escalated join requests for a group. Requires team-management permission.

```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"}}},"JoinRequest":{"type":"object","properties":{"assigned_role":{"type":"string"},"assigned_section_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"escalated_at":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"requested_role":{"type":"string"},"requester_user_id":{"type":"string","format":"uuid"},"status":{"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}/join-requests":{"get":{"description":"Lists the pending and escalated join requests for a group. Requires team-management permission.","tags":["join-requests"],"summary":"List open join requests","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"Open (pending and escalated) join requests","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JoinRequest"}}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Caller lacks team-management permission for this group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Request to join a group

> Creates a request to join a group that has already been claimed. The group's admins are notified.

```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"}}},"JoinRequest":{"type":"object","properties":{"assigned_role":{"type":"string"},"assigned_section_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"escalated_at":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"requested_role":{"type":"string"},"requester_user_id":{"type":"string","format":"uuid"},"status":{"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"}}},"CreateRequest":{"type":"object","properties":{"requested_role":{"type":"string","maxLength":100}}}}},"paths":{"/v1/groups/{group_id}/join-requests":{"post":{"description":"Creates a request to join a group that has already been claimed. The group's admins are notified.","tags":["join-requests"],"summary":"Request to join a group","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Group ID","name":"group_id","in":"path","required":true}],"responses":{"201":{"description":"The created join request (status: pending)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JoinRequest"}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"You already have an open request for this group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"description":"Optional requested role"}}}}}
```

## Approve a join request

> Assigns a role and activates the requester's membership. Requires team-management permission on the request's group.

```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"}}},"ApproveResult":{"type":"object","properties":{"membership":{"$ref":"#/components/schemas/JoinrequestsMembership"},"request":{"$ref":"#/components/schemas/JoinRequest"}}},"JoinrequestsMembership":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"role":{"type":"string"},"status":{"type":"string"},"user_id":{"type":"string","format":"uuid"}}},"JoinRequest":{"type":"object","properties":{"assigned_role":{"type":"string"},"assigned_section_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"escalated_at":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"requested_role":{"type":"string"},"requester_user_id":{"type":"string","format":"uuid"},"status":{"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"}}},"ApproveRequest":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["gsl","admin","section_leader","assistant_leader","helper"]},"section_id":{"type":"string","format":"uuid"}}}}},"paths":{"/v1/join-requests/{id}/approve":{"post":{"description":"Assigns a role and activates the requester's membership. Requires team-management permission on the request's group.","tags":["join-requests"],"summary":"Approve a join request","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Join request ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The updated request and the membership it created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApproveResult"}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Caller lacks team-management permission for this request's group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No join request 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/ApproveRequest"}}},"description":"Role (and optional section) to assign","required":true}}}}}
```

## Decline a join request

> Declines a request. Requires team-management permission on the request's group.

```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"}}},"JoinRequest":{"type":"object","properties":{"assigned_role":{"type":"string"},"assigned_section_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"escalated_at":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"requested_role":{"type":"string"},"requester_user_id":{"type":"string","format":"uuid"},"status":{"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/join-requests/{id}/decline":{"post":{"description":"Declines a request. Requires team-management permission on the request's group.","tags":["join-requests"],"summary":"Decline a join request","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Join request ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The updated request (status: declined)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JoinRequest"}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Caller lacks team-management permission for this request's group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No join request with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Submit manual verification

> The requester submits the Appendix A verification form, moving the request to limbo for Trooply review.

```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"}}},"JoinRequest":{"type":"object","properties":{"assigned_role":{"type":"string"},"assigned_section_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"escalated_at":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"requested_role":{"type":"string"},"requester_user_id":{"type":"string","format":"uuid"},"status":{"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"}}},"VerifyRequest":{"type":"object","required":["dc_contact","declared_role","tsa_membership_number"],"properties":{"dc_contact":{"type":"string","maxLength":200,"minLength":1},"declared_role":{"type":"string","maxLength":100,"minLength":1},"tsa_membership_number":{"type":"string","maxLength":100,"minLength":1}}}}},"paths":{"/v1/join-requests/{id}/verify":{"post":{"description":"The requester submits the Appendix A verification form, moving the request to limbo for Trooply review.","tags":["join-requests"],"summary":"Submit manual verification","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"Join request ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The updated request (status: limbo, awaiting Trooply review)","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JoinRequest"}}}]}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Only the original requester may submit this verification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No join request with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request is not awaiting manual verification","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/VerifyRequest"}}},"description":"Appendix A verification details","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/join-requests.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.
