# us.off-the-clock.getMembership

> Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.getMembership)
- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.getMembership/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.getMembership/examples)

## Definitions

### `us.off-the-clock.getMembership`

**Type**: `query`

Community-wide membership, computed from the records in the management spaces: the same projection this service uses to answer com.atproto.simplespace.checkUserAccess for every space. A trusted service may ask about any DID; a viewer only about themselves. A non-member is an answer, not an error.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The account to ask about. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `admin` | `boolean` | Yes | An effective admin: administers every pair. |
| `adminOf` | `array` | Yes | The TIDs of the pairs this DID administers (D35). |
| `did` | `string` (did) | Yes |  |
| `invited` | `boolean` | No | A counting grant names this DID but it has not joined yet (D60): it reads nothing and is listed nowhere. |
| `member` | `boolean` | Yes | The community identity, or a DID that has joined: a counting grant and its own acceptance (D60). |
| `spaces` | `array` | Yes | The spaces granted, as <space-type>/<space-id>; the default pair's content space is always included for a member. |

#### Errors

- **Forbidden**: The caller may not ask about this DID.
- **InvalidRequest**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Community-wide membership, computed from the records in the management spaces: the same projection this service uses to answer com.atproto.simplespace.checkUserAccess for every space. A trusted service may ask about any DID; a viewer only about themselves. A non-member is an answer, not an error.",
      "errors": [
        {
          "description": "The caller may not ask about this DID.",
          "name": "Forbidden"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "admin": {
              "description": "An effective admin: administers every pair.",
              "type": "boolean"
            },
            "adminOf": {
              "description": "The TIDs of the pairs this DID administers (D35).",
              "items": {
                "format": "tid",
                "type": "string"
              },
              "type": "array"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "invited": {
              "description": "A counting grant names this DID but it has not joined yet (D60): it reads nothing and is listed nowhere.",
              "type": "boolean"
            },
            "member": {
              "description": "The community identity, or a DID that has joined: a counting grant and its own acceptance (D60).",
              "type": "boolean"
            },
            "spaces": {
              "description": "The spaces granted, as <space-type>/<space-id>; the default pair's content space is always included for a member.",
              "items": {
                "maxLength": 512,
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "did",
            "member",
            "admin",
            "adminOf",
            "spaces"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "did": {
            "description": "The account to ask about.",
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "did"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "us.off-the-clock.getMembership",
  "lexicon": 1
}
```
