---
title: "GetMembership"
method: POST
path: "/gitpod.v1.GroupService/GetMembership"
tags: ["gitpod.v1.GroupService"]
---

# GetMembership

`POST /gitpod.v1.GroupService/GetMembership`

Gets a specific membership by group ID and subject.

 Use this method to:
 - Check if a user or service account is a member of a group
 - Verify group membership for access control

 ### Examples

 - Check user membership:

   Checks if a user is a member of a specific group.

   ```yaml
   groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   subject:
     id: "f53d2330-3795-4c5d-a1f3-453121af9c60"
     principal: PRINCIPAL_USER
   ```

 ### Authorization

 All organization members can check group membership (transparency model).

## Request body

- GitpodV1GetMembershipRequest — GetMembership messages
  - `groupId` string, uuid
  - `subject` GitpodV1Subject, required
    - `id` string, uuid — id is the UUID of the subject
    - `principal` 'PRINCIPAL_UNSPECIFIED' | 'PRINCIPAL_ACCOUNT' | 'PRINCIPAL_USER' | 'PRINCIPAL_RUNNER' | 'PRINCIPAL_ENVIRONMENT' | 'PRINCIPAL_SERVICE_ACCOUNT' | 'PRINCIPAL_RUNNER_MANAGER'

## Response `200`

Success

- GitpodV1GetMembershipResponse
  - `member` GitpodV1GroupMembership — GroupMembership represents a subject's membership in a group
    - `avatarUrl` string — Subject's avatar URL
    - `groupId` string, uuid — Group identifier
    - `id` string, uuid — Unique identifier for the group membership
    - `name` string — Subject's display name
    - `subject` GitpodV1Subject
      - `id` string, uuid — id is the UUID of the subject
      - `principal` 'PRINCIPAL_UNSPECIFIED' | 'PRINCIPAL_ACCOUNT' | 'PRINCIPAL_USER' | 'PRINCIPAL_RUNNER' | 'PRINCIPAL_ENVIRONMENT' | 'PRINCIPAL_SERVICE_ACCOUNT' | 'PRINCIPAL_RUNNER_MANAGER'

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
