Delete an SMTP Custom Email

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

Before You Begin

🔗 Use the GraphQL Playground to execute the queries in this guide.

➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.

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 (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

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

Arguments

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

Example variables

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

Expected response

{
  "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.