Skip to main content
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
You can delete customers with the deleteCustomer API. To delete a customer you will need the customer’s ID from within Plain. You can get this ID in the UI by going to a thread from that customer and pressing the ‘Copy ID’ button from the customer details panel on the right, or via our fetch API. Deleting a customer will trigger an asynchronous process which causes all data (such as threads) associated with that customer to be deleted. This operation requires the following permissions:
  • customer:delete
Mutation
mutation deleteCustomer($input: DeleteCustomerInput!) {
  deleteCustomer(input: $input) {
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
  }
}