---
title: "thirdUserDelete"
description: >
  Delete a specified third-party user from a chat app or messaging system. Before you call this mutation, ensure that the 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/third-user-delete'
  md: 'https://developer.shopline.com/docs/storefront-api/message/mutations/third-user-delete.md'
---
# thirdUserDelete

Delete a specified third-party user from a chat app or messaging system. Before you call this mutation, ensure that the 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`

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

  The input fields to delete a third-party user.

## Returns

* `success`

  [Boolean](https://developer.shopline.com/docs/storefront-api/common/scalars/boolean.md)

  Whether the deletion was successful.

* `userErrors`

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

  Errors related to the user information.

* `userId`

  [ID](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  ID of the third-party user.

## Examples

### Delete a third-party user

Delete a specified third-party user from a chat application or messaging system. Before you call this mutation, ensure that the 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 ThirdUserDelete {
    thirdUserDelete(input: { userId: "gid://shopline/ThirdUser/******5235111" }) {
        success
        userId
        userErrors {
            code
            field
            message
        }
    }
}
```

**Response:**

```json
{
  "data": {
    "thirdUserDelete": {
      "success": true,
      "userErrors": [],
      "userId": "gid://shopline/ThirdUser/******5235111"
    }
  }
}
```

## 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).

