customerDelete mutation
Deletes a customer.
Required access
write_customers access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation customerDelete($input: CustomerDeleteInput!) { customerDelete(input: $input) {} } { “input”: {
<font style="color:#1F61A0;">deletedCustomerId</font><font style="color:#1F61A0;">shop</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
} }
<font style="color:#8B2BB9;">"id"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE="</font>
Arguments
| Argument | Description | 
|---|---|
input( [CustomerDeleteInput!](https://shopify.dev/docs/admin-api/graphql/reference/customers/customerdeleteinput)) REQUIRED  | 
Specifies the customer to delete. | 
CustomerDeleteInput fields
- id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED
The ID of the customer to delete. 
Return fields
- deletedCustomerId (
[ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
ID of the deleted customer. - shop (
[Shop!](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop))
Shop of the deleted customer. - userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
List of errors that occurred executing the mutation. 
