# town.delve.graph.getListsWithMembership

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.graph.getListsWithMembership)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.graph.getListsWithMembership/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.graph.getListsWithMembership/examples)

## Definitions

### `town.delve.graph.getListsWithMembership#listWithMembership`

**Type**: `object`

A list and an optional list item indicating membership of a target user to that list.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `list` | `ref` → `town.delve.graph.defs#listView` | Yes |  |
| `listItem` | `ref` → `town.delve.graph.defs#listItemView` | No |  |

### `town.delve.graph.getListsWithMembership`

**Type**: `query`

Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` (at-identifier) | Yes | The account (actor) to check for membership. |
| `cursor` | `string` | No |  |
| `limit` | `integer` | No |  |
| `purposes` | `array` | No | Optional filter by list purpose. If not specified, all supported types are returned. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `listsWithMembership` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "listWithMembership": {
      "description": "A list and an optional list item indicating membership of a target user to that list.",
      "properties": {
        "list": {
          "ref": "town.delve.graph.defs#listView",
          "type": "ref"
        },
        "listItem": {
          "ref": "town.delve.graph.defs#listItemView",
          "type": "ref"
        }
      },
      "required": [
        "list"
      ],
      "type": "object"
    },
    "main": {
      "description": "Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "listsWithMembership": {
              "items": {
                "ref": "#listWithMembership",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "listsWithMembership"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "actor": {
            "description": "The account (actor) to check for membership.",
            "format": "at-identifier",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "purposes": {
            "description": "Optional filter by list purpose. If not specified, all supported types are returned.",
            "items": {
              "knownValues": [
                "modlist",
                "curatelist"
              ],
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "actor"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "town.delve.graph.getListsWithMembership",
  "lexicon": 1
}
```
