# app.didpic.chat.sendMessage

> Published by [lexicons.didpic.app](https://lexicon.garden/identity/did:plc:an2jtp4jgkkbtmwfzhpbxawd)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.chat.sendMessage)
- [Documentation](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.chat.sendMessage/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.chat.sendMessage/examples)

## Definitions

### `app.didpic.chat.sendMessage`

**Type**: `procedure`

Send a message into a conversation the caller participates in.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `conversationId` | `string` | Yes |  |
| `image` | `object` | No |  |
| `linkPreview` | `object` | No |  |
| `replyToMessageId` | `string` | No |  |
| `sharedPostUri` | `string` (at-uri) | No |  |
| `text` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `message` | `ref` → `app.didpic.chat.defs#messageView` | Yes |  |

#### Errors

- **Blocked**
- **InvalidRequest**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Send a message into a conversation the caller participates in.",
      "errors": [
        {
          "name": "Blocked"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "conversationId": {
              "type": "string"
            },
            "image": {
              "properties": {
                "height": {
                  "minimum": 1,
                  "type": "integer"
                },
                "key": {
                  "type": "string"
                },
                "width": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "required": [
                "key",
                "width",
                "height"
              ],
              "type": "object"
            },
            "linkPreview": {
              "properties": {
                "description": {
                  "maxLength": 500,
                  "type": "string"
                },
                "imageHeight": {
                  "minimum": 1,
                  "type": "integer"
                },
                "imageKey": {
                  "type": "string"
                },
                "imageWidth": {
                  "minimum": 1,
                  "type": "integer"
                },
                "title": {
                  "maxLength": 300,
                  "type": "string"
                },
                "url": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "type": "object"
            },
            "replyToMessageId": {
              "type": "string"
            },
            "sharedPostUri": {
              "format": "at-uri",
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "conversationId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "message": {
              "ref": "app.didpic.chat.defs#messageView",
              "type": "ref"
            }
          },
          "required": [
            "message"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "app.didpic.chat.sendMessage",
  "lexicon": 1
}
```
