> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createDirectMessage

> Send a message to a direct message or thread

**Required scope:** `write:chats`



**mutation** `createDirectMessage(input: CreateDirectMessageInput!): CreateDirectMessagePayload`

## Arguments

**`input`**: `CreateDirectMessageInput!` (required)

Parameters for CreateDirectMessage

## Returns

`CreateDirectMessagePayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`errors`**: `[String!]!`

---

**`message`**: `PrivateMessage`

## Examples

```graphql Mutation
mutation CreateDirectMessage($input: CreateDirectMessageInput!) {
  createDirectMessage(input: $input) {
    clientMutationId
    errors
    message {
      actorType
      artifact {
        createdAt
        description
        html
        id
        kind
        status
      }
      assets {
        aspectRatio
        assetStyle
        contentType
        fileSize
        id
        imageUrl
      }
      conversation {
        bookmarkedAt
        id
        lastChatAt
        lastMessage {
          __typename
        }
        messages {
          __typename
        }
        participants {
          __typename
        }
      }
      createdAt
      embeddedLink {
        actionText
        description
        faviconUrl
        id
        imageUrl
        isVideo
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "conversationId": "id",
    "text": "string"
  }
}
```

```json Response
{
  "data": {
    "createDirectMessage": {
      "clientMutationId": "string",
      "errors": [
        "string"
      ],
      "message": {
        "actorType": "COHOST",
        "artifact": {
          "createdAt": "value",
          "description": "string",
          "html": "string",
          "id": "id",
          "kind": "string",
          "status": "string"
        },
        "assets": [
          {
            "aspectRatio": 1.5,
            "assetStyle": "string",
            "contentType": "string",
            "fileSize": "string",
            "id": "id",
            "imageUrl": "string"
          }
        ],
        "conversation": {
          "bookmarkedAt": "value",
          "id": "id",
          "lastChatAt": "value",
          "lastMessage": {
            "__typename": "PrivateMessage"
          },
          "messages": {
            "__typename": "PrivateMessageConnection"
          },
          "participants": [
            {
              "__typename": "User"
            }
          ]
        },
        "createdAt": "value",
        "embeddedLink": {
          "actionText": "string",
          "description": "string",
          "faviconUrl": "string",
          "id": "id",
          "imageUrl": "string",
          "isVideo": true
        }
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.