# Manage   Groups

## POST /get-groups

> List groups

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/get-groups":{"post":{"operationId":"get_groups","summary":"List groups","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /get-groups-all

> List all groups

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/get-groups-all":{"post":{"operationId":"get_groups_all","summary":"List all groups","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /get-group

> Get single group

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/get-group":{"post":{"operationId":"get_group","summary":"Get single group","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /create-group

> Create group

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/create-group":{"post":{"operationId":"create_group","summary":"Create group","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /update-group

> Update group

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/update-group":{"post":{"operationId":"update_group","summary":"Update group","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /delete-group

> Delete group

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/delete-group":{"post":{"operationId":"delete_group","summary":"Delete group","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /manage-groups

> Manage groups

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/manage-groups":{"post":{"operationId":"manage_groups","summary":"Manage groups","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /import-groups

> Import groups

```json
{"openapi":"3.0.3","info":{"title":"Investhub API","version":"1.0.0"},"servers":[{"url":"https://{project}.supabase.co/functions/v1","variables":{"project":{"default":"your-project-ref","description":"Supabase project reference"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Privy access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/import-groups":{"post":{"operationId":"import_groups","summary":"Import groups","tags":["Manage - Groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"See Edge Function source for exact request shape (e.g. interface XxxRequest in index.ts)"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
