# chat.sprk.moderation.getMessageContext

> Published by [sprk.so](https://lexicon.garden/identity/did:plc:cveom2iroj3mt747sd4qqnr2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/chat.sprk.moderation.getMessageContext)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/chat.sprk.moderation.getMessageContext/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/chat.sprk.moderation.getMessageContext/examples)

## Definitions

### `chat.sprk.moderation.getMessageContext`

**Type**: `query`

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `after` | `integer` | No |  |
| `before` | `integer` | No |  |
| `convoId` | `string` | No | Conversation that the message is from. NOTE: this field will eventually be required. |
| `messageId` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `messages` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "chat.sprk.moderation.getMessageContext",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "messages"
          ],
          "properties": {
            "messages": {
              "type": "array",
              "items": {
                "refs": [
                  "chat.sprk.convo.defs#messageView",
                  "chat.sprk.convo.defs#deletedMessageView"
                ],
                "type": "union"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "messageId"
        ],
        "properties": {
          "after": {
            "type": "integer",
            "default": 5
          },
          "before": {
            "type": "integer",
            "default": 5
          },
          "convoId": {
            "type": "string",
            "description": "Conversation that the message is from. NOTE: this field will eventually be required."
          },
          "messageId": {
            "type": "string"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
