---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Delete an SMTP Custom Email

Delete a custom sender (SMTP Custom Email) via the GraphQL API.

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the queries in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Why this use case

Use this mutation to remove a custom sender you no longer need. When the sender's SMTP configuration is not the organization default and is used only by this sender, the configuration is removed along with it.

***

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts) (Personal Access Tokens are deprecated).
2. **Permissions**: Your token must be able to manage the target SMTP custom email.
3. **SMTP Custom Email ID**: Identify the `id` of the sender you want to delete.

## Step 1: Run the mutation

```graphql
mutation DeleteSmtpCustomEmail($id: ID!) {
  deleteSmtpCustomEmail(input: { id: $id }) {
    success
  }
}
```

### Arguments

* `id`: ID — **Required** — The SMTP Custom Email to delete.

### Example variables

```json
{
  "id": "a4f1b2c3-d4e5-6f78-9abc-d0e1f2a3b4c5"
}
```

### Expected response

```json
{
  "data": {
    "deleteSmtpCustomEmail": {
      "success": true
    }
  }
}
```

***

## Key notes

* The attached SMTP configuration is deleted **only** when it is not the organization's default configuration and is used by no other sender. Default or shared configurations are kept.
* Passing an `id` that does not exist returns a "not found" error.