# us.off-the-clock.browseSpaces

> 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.browseSpaces)
- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.browseSpaces/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.browseSpaces/examples)

## Definitions

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

**Type**: `query`

The space directory (D50): the spaces with a profile, in record-key order, oldest first, for members who read the default pair's content space. Nothing of a space's records is in it, only what its admins wrote about it.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | The last record key of the page before. |
| `limit` | `integer` | No |  |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **InvalidRequest**
- **NotSpaceMember**

### `us.off-the-clock.browseSpaces#spaceView`

**Type**: `object`

A listed space: its profile, with signed images, the admins to ask, its member count, whether the viewer holds it and whether it has a policy to accept.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `admins` | `array` | Yes | The current profiles of the record's admin DIDs, in order, or the pair's team when the record names none. |
| `avatar` | `string` (uri) | Yes |  |
| `cid` | `string` (cid) | Yes |  |
| `description` | `string` | Yes |  |
| `displayName` | `string` | Yes |  |
| `facets` | `array` | No |  |
| `hasPolicy` | `boolean` | Yes |  |
| `header` | `string` (uri) | Yes |  |
| `memberCount` | `integer` | Yes |  |
| `space` | `string` (at-uri) | Yes | The space's content space. |
| `tid` | `string` (tid) | Yes | The pair's TID: the profile's record key. |
| `uri` | `string` (at-uri) | Yes |  |
| `viewerIsMember` | `boolean` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The space directory (D50): the spaces with a profile, in record-key order, oldest first, for members who read the default pair's content space. Nothing of a space's records is in it, only what its admins wrote about it.",
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "NotSpaceMember"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "spaces": {
              "items": {
                "ref": "#spaceView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "spaces"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "The last record key of the page before.",
            "maxLength": 64,
            "type": "string"
          },
          "limit": {
            "default": 24,
            "maximum": 48,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    },
    "spaceView": {
      "description": "A listed space: its profile, with signed images, the admins to ask, its member count, whether the viewer holds it and whether it has a policy to accept.",
      "properties": {
        "admins": {
          "description": "The current profiles of the record's admin DIDs, in order, or the pair's team when the record names none.",
          "items": {
            "ref": "app.bsky.actor.defs#profileViewBasic",
            "type": "ref"
          },
          "type": "array"
        },
        "avatar": {
          "format": "uri",
          "type": "string"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "facets": {
          "items": {
            "ref": "app.bsky.richtext.facet",
            "type": "ref"
          },
          "type": "array"
        },
        "hasPolicy": {
          "type": "boolean"
        },
        "header": {
          "format": "uri",
          "type": "string"
        },
        "memberCount": {
          "minimum": 0,
          "type": "integer"
        },
        "space": {
          "description": "The space's content space.",
          "format": "at-uri",
          "type": "string"
        },
        "tid": {
          "description": "The pair's TID: the profile's record key.",
          "format": "tid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "viewerIsMember": {
          "type": "boolean"
        }
      },
      "required": [
        "space",
        "tid",
        "uri",
        "cid",
        "displayName",
        "description",
        "avatar",
        "header",
        "admins",
        "memberCount",
        "viewerIsMember",
        "hasPolicy"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.browseSpaces",
  "lexicon": 1
}
```
