---
title: "customerDelete"
description: "Delete customer"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/mutations/customer-delete'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/mutations/customer-delete.md'
---
# customerDelete

Delete customer

- **Required Scopes:** `write_customers`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`CustomerDeletePayload`

## Required Permissions

* `write_customers`

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`

  [CustomerDeleteInput!](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-delete-input.md)

  Delete customer by ID

## Returns

* `deletedCustomerId`

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

  Deleted customer ID

* `userErrors`

  [[BusinessCustomerUserError]](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/business-customer-user-error.md)

  error message

## Code Example

```graphql
mutation customerDelete($input: CustomerDeleteInput! ) {
	customerDelete(input: $input ) 
		 {
			# CustomerDeletePayload fields
		}
		
	}

```

## Variables

```json
{
  "input": {
    "id": {}
  }
}
```

## Error Handling

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

