# us.off-the-clock.browseSpaces

> 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.

- Kind: query
- Authority: off-the-clock.us
- Lexicon: 1
- Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.browseSpaces)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.browseSpaces/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.browseSpaces/analytics)

## Query (`us.off-the-clock.browseSpaces`)

Type: query · GET

### Parameters (query string)

- `cursor` (string): The last record key of the page before.
  - Constraints: maxLength: 64
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 48, default: 24

### Output (application/json)

- `cursor` (string)
- `spaces` (array, required)
  - `items` (ref)
    - Reference: `#spaceView`

### Errors

- `InvalidRequest`: No description in schema.
- `NotSpaceMember`: No description in schema.

## #spaceView (`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.

### Properties

- `admins` (array, required): The current profiles of the record's admin DIDs, in order, or the pair's team when the record names none.
  - `items` (ref)
    - Reference: `app.bsky.actor.defs#profileViewBasic`
- `avatar` (string · uri, required)
- `cid` (string · cid, required)
- `description` (string, required)
- `displayName` (string, required)
- `facets` (array)
  - `items` (ref)
    - Reference: `app.bsky.richtext.facet`
- `hasPolicy` (boolean, required)
- `header` (string · uri, required)
- `memberCount` (integer)
  - Constraints: minimum: 0
- `membersHidden` (boolean): The member list is for the pair's admins; memberCount is left out for anyone else.
- `parentAccess` (string): Everyone in the community reads (read), or reads and writes (write), the space without a member entry. Left out for a private space.
  - Constraints: knownValues: read | write
- `space` (string · at-uri, required): The space's content space.
- `tid` (string · tid, required): The pair's TID: the profile's record key.
- `uri` (string · at-uri, required)
- `viewerIsMember` (boolean, required)

## 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"
        },
        "membersHidden": {
          "description": "The member list is for the pair's admins; memberCount is left out for anyone else.",
          "type": "boolean"
        },
        "parentAccess": {
          "description": "Everyone in the community reads (read), or reads and writes (write), the space without a member entry. Left out for a private space.",
          "knownValues": [
            "read",
            "write"
          ],
          "type": "string"
        },
        "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",
        "viewerIsMember",
        "hasPolicy"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.browseSpaces",
  "lexicon": 1
}
```
