# app.zeens.getChatGate

> Return whether a sender may start/continue a conversation with a recipient, based on the recipient's chatPrefs and the follow relationship. Used by the server-side start gate.

- Kind: query
- Authority: zeens.app
- Lexicon: 1
- Published by [zeens.app](https://lexicon.garden/identity/did:plc:pwpuqwge6g7xrjmfbw73uycw), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate/analytics)

## Query (`app.zeens.getChatGate`)

Type: query · GET

### Parameters (query string)

- `recipient` (string · did, required)
- `sender` (string · did, required)

### Output (application/json)

- `allow` (string, required)
  - Constraints: enum: off | mutuals | everyone
- `bucket` (string)
  - Constraints: enum: inbox | requests
- `mutuals` (boolean, required)
- `permitted` (boolean, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Return whether a sender may start/continue a conversation with a recipient, based on the recipient's chatPrefs and the follow relationship. Used by the server-side start gate.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "allow": {
              "enum": [
                "off",
                "mutuals",
                "everyone"
              ],
              "type": "string"
            },
            "bucket": {
              "enum": [
                "inbox",
                "requests"
              ],
              "type": "string"
            },
            "mutuals": {
              "type": "boolean"
            },
            "permitted": {
              "type": "boolean"
            }
          },
          "required": [
            "allow",
            "mutuals",
            "permitted"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "recipient": {
            "format": "did",
            "type": "string"
          },
          "sender": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "sender",
          "recipient"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "app.zeens.getChatGate",
  "lexicon": 1
}
```
