---
title: "thirdUserCreate"
description: "Create a third-party user in a chat app or messaging system."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-create'
  md: 'https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-create.md'
---
# thirdUserCreate

Create a third-party user in a chat app or messaging system. 

- **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`

  [ThirdUserCreateInput](https://developer.shopline.com/docs/storefront-api/message/inputs/third-user-create-input.md)

  The input fields to create a third-party user.

## Returns

* `thirdUser`

  [ThirdUser](https://developer.shopline.com/docs/storefront-api/message/objects/third-user.md)

  Information about the third-party user.

* `userErrors`

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

  Errors related to the user information.

## Examples

### Create a third-party user

Create a third-party user in a chat application or messaging system. This is a prerequisite for calling other relevant APIs.

**Request:**

```json
mutation ThirdUserCreate {
    thirdUserCreate(
        input: {
            userName: "vito"
            userId: "gid://shopline/ThirdUser/******5235111"
            userPhone: "+1213***5678"
            gender: MALE
        }
    ) {
        userErrors {
            code
            field
            message
        }
        thirdUser {
            id
        }
    }
}
```

**Response:**

```json
{
  "data": {
    "thirdUserCreate": {
      "thirdUser": {
        "id": "gid://shopline/ThirdUser/******5235111"
      },
      "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).

