# app.zeens.getChatGate

> Published by [zeens.app](https://lexicon.garden/identity/did:plc:pwpuqwge6g7xrjmfbw73uycw)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pwpuqwge6g7xrjmfbw73uycw/app.zeens.getChatGate/examples)

## Definitions

### `app.zeens.getChatGate`

**Type**: `query`

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.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `recipient` | `string` (did) | Yes |  |
| `sender` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `allow` | `string` | Yes |  |
| `bucket` | `string` | No |  |
| `mutuals` | `boolean` | Yes |  |
| `permitted` | `boolean` | Yes |  |

## Raw 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
}
```
