> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Get team membership


GET https://{tenant_name}.benchling.com/api/v2/teams/{team_id}/memberships/{user_id}

Returns team membership in the given team for the given user


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/teams/get-team-membership

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `team_id` (string, required)
- `user_id` (string, required)

## Response

### 200

OK

- `role` (enum, optional)
  - Allowed values: `ADMIN`, `MEMBER`
- `user` (UserSummary, optional)

## Errors

### 404 Not Found Error

Not Found

- `error` (NotFoundErrorError, optional)

## Types

### UserSummary

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### NotFoundErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)
- `invalidId` (string, optional)

## Examples

**Response**

```json
{
  "role": "ADMIN",
  "user": {
    "handle": "string",
    "id": "string",
    "name": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/teams/team_id/memberships/user_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/teams/team_id/memberships/user_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```