---
title: "conversationCreate"
description: >
  Create a new conversation in a chat app or messaging system. Before you call this mutation, ensure that a third-party user has been created using the [thirdUserCreate](https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-create.md) mutation.
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/message/mutations/conversation-create'
  md: 'https://developer.shopline.com/docs/storefront-api/message/mutations/conversation-create.md'
---
# conversationCreate

Create a new conversation in a chat app or messaging system. Before you call this mutation, ensure that a third-party user has been created using the [thirdUserCreate](https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-create.md) mutation.

- **Required Scopes:** `unauthenticated_write_message`
- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Required Permissions

* `unauthenticated_write_message`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `input`

  [ConversationCreateInput!](https://developer.shopline.com/docs/storefront-api/message/inputs/conversation-create-input.md)

  The input fields to create a conversation.

## Returns

* `conversation`

  [Conversation](https://developer.shopline.com/docs/storefront-api/message/objects/conversation.md)

  Conversation information.

* `userErrors`

  [[ConversationUserError!]!](https://developer.shopline.com/docs/storefront-api/message/objects/conversation-user-error.md)

  Errors related to the user information.

## Examples

### Create a conversation

Create a new conversation in a chat application or messaging system. Before you call this mutation, ensure that a third-party user has been created using the [thirdUserCreate](https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-create.md) mutation.

**Request:**

```json
mutation  {
    conversationCreate(input: { userId: "gid://shopline/ThirdUser/******5235111" }) {
        userErrors {
            code
            field
            message
        }
        conversation {
            id
        }
    }
}

```

**Response:**

```json
{
  "data": {
    "conversationCreate": {
      "conversation": {
        "id": "gid://shopline/Conversation/******403588"
      },
      "userErrors": []
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

