---
updatedAt: 2026-10-30T08:58:47.000Z
agentTools:
  projectIndex: https://docs.wati.io/llms.txt
---

# Batch delete saved segments

Retained legacy exception: Delete saved segments, currently absent from V3.

Delete saved segments, currently absent from V3.

Requires a nonempty segmentIds list. System segments are not deleted and appear in failedSegmentIds; blank IDs are skipped. Deletions are sequential and are not rolled back on partial failure. Inspect deletedCount and failedSegmentIds before another write.

### Permissions

For API access tokens and OIDC tokens, satisfy at least one of: `api`, `wati_integration:write`. Legacy JWTs do not use this scope check. Allowed roles: DEVELOPER, ADMINISTRATOR, EXTERNAL_ADMINISTRATOR, PARTNER_ADMINISTRATOR, AI_OPERATOR or API_TOKEN. FLEXI_TRIAL and FLEXI_PAID are denied even with another listed role. Workspace and billing restrictions also apply. Saved-segment operations require account availability and a qualifying Pro or Business subscription. Denial can return 400 with result=false and info; scopes alone do not grant access.

# OpenAPI definition

```json
{
  "openapi": "3.0.4",
  "info": {
    "title": "WATI API",
    "version": "2.6",
    "description": "Documentation contract version 2.6. Use V3 for supported business operations, adopting its request, response, defaults and pagination. Retain V1/V2 only for the business exceptions listed in Introduction. API route versions are independent of this artifact version.\n\nSend Authorization: Bearer <your-token> with the workspace credential and regional API host. API route version does not select the authentication mechanism. Endpoint scopes, roles, account availability and channel access still apply; consult Authentication and each operation.\n\nChannel support is operation-specific. GET /api/ext/v3/channels lists additional connected channels and may exclude the default WhatsApp number; do not infer full channel coverage or permission to send from discovery alone.\n\nInspect HTTP status and business result separately. Some operations report business failure or partial recipient failure in HTTP 200. Authorization errors may have no JSON body. A 429 can indicate a rate or usage limit. For unknown write outcomes, reconcile state before retrying; do not assume idempotency.\n\nCreate webhook subscriptions through the documented V2 exception or the dashboard, then manage them through V3. Use supported event types for the workspace and distinguish request acceptance from final message delivery.",
    "contact": {
      "name": "WATI Support",
      "url": "https://docs.wati.io"
    }
  },
  "servers": [
    {
      "url": "https://live-mt-server.wati.io",
      "description": "WATI API host. Legacy v1 and v2 endpoints require tenantId in the path; v3 endpoints do not."
    }
  ],
  "paths": {
    "/{tenantId}/api/v1/deleteCustomSegments": {
      "post": {
        "summary": "Batch delete saved segments",
        "operationId": "Batchdeletesavedsegments",
        "tags": [
          "Legacy exceptions"
        ],
        "description": "Retained legacy exception: Delete saved segments, currently absent from V3.\n\nDelete saved segments, currently absent from V3.\n\nRequires a nonempty segmentIds list. System segments are not deleted and appear in failedSegmentIds; blank IDs are skipped. Deletions are sequential and are not rolled back on partial failure. Inspect deletedCount and failedSegmentIds before another write.\n\n### Permissions\n\nFor API access tokens and OIDC tokens, satisfy at least one of: `api`, `wati_integration:write`. Legacy JWTs do not use this scope check. Allowed roles: DEVELOPER, ADMINISTRATOR, EXTERNAL_ADMINISTRATOR, PARTNER_ADMINISTRATOR, AI_OPERATOR or API_TOKEN. FLEXI_TRIAL and FLEXI_PAID are denied even with another listed role. Workspace and billing restrictions also apply. Saved-segment operations require account availability and a qualifying Pro or Business subscription. Denial can return 400 with result=false and info; scopes alone do not grant access.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Workspace ID; use the regional API host and matching workspace credential."
          }
        ],
        "responses": {
          "200": {
            "description": "May partially succeed. result=true means at least one deletion, not that every ID was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "boolean"
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "deletedCount": {
                          "type": "integer"
                        },
                        "failedSegmentIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, missing segment, account eligibility or operation failure; inspect result/info.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "boolean"
                    },
                    "info": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized; a JSON body is not guaranteed."
          },
          "403": {
            "description": "Access denied by scopes, roles, workspace or billing; a JSON body is not guaranteed."
          },
          "429": {
            "description": "Rate or usage limit exceeded."
          },
          "500": {
            "description": "Unexpected failure. Reconcile state before retrying a write.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "boolean"
                    },
                    "info": {}
                  }
                }
              }
            }
          }
        },
        "x-wati-permissions": {
          "scopeRequirementGroups": [
            {
              "anyOf": [
                "api",
                "wati_integration:write"
              ]
            }
          ],
          "groupOperator": "allOf",
          "appliesTo": [
            "ApiAccessToken",
            "OIDC"
          ],
          "legacyJwtScopeCheck": "skipped",
          "conditional": true,
          "sourceCommit": "0dcbc42c7f28992be90d1853cf205693889d9c14"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "segmentIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "segmentIds"
                ]
              },
              "example": {
                "segmentIds": [
                  "<saved-segment-id>"
                ]
              }
            }
          }
        },
        "x-wati-documentation": {
          "discovery": "legacy-exception",
          "reason": "Delete saved segments, currently absent from V3."
        },
        "x-internal": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token from your WATI Dashboard > API Settings. Pass as `Authorization: Bearer <token>`."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
```