Skip to content
WhatSync/DocsAPI v1

Remove numbers from the filter list

Remove one number (phoneNumber) or up to 100 (phoneNumbers) from the current include or exclude list.

POST/api/v1/tools/remove_number_filterWrite
Key permissions
Read chats and messages + Change saved chats and filters
Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work

How it works

This changes which chats are saved and shown; it does not delete message history.

Body parameters

idempotencyKeystringbody or header

A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action.

phoneNumberstringoptional

Full international phone number, including country code.

phoneNumbersstring[]optional

Full international phone numbers, including country codes.

fromNumberstringoptional

Which of the account's WhatsApp numbers acts, with country code, as listed in whatsapp_numbers from get_account_context. Only matters when the account has several numbers. Omit for the account's first number.

Conditions and pagination

  • Supply phoneNumber or phoneNumbers (up to 100 numbers total). name can label only a single number. The current include/exclude mode determines the effect.
  • Use a unique idempotency key for each intended action. Reuse the same key and exactly the same input on a retry. The body key takes precedence over Idempotency-Key.

Response

The response wraps tool-specific data in result. Save operation_id and inspect get_operation with operationId if the outcome is uncertain. completed means the operation completed; it does not prove message delivery or Meta approval. An uncertain operation returns HTTP 409 with error.operation_id.

Every response includes X-Request-Id. Errors use the shared error format and retry rules.

Schemas

Input JSON Schema
Input JSON Schema
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{8,128}$",
      "description": "A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action."
    },
    "phoneNumber": {
      "type": "string",
      "minLength": 7,
      "maxLength": 30
    },
    "phoneNumbers": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 7,
        "maxLength": 30
      },
      "minItems": 1,
      "maxItems": 100
    },
    "fromNumber": {
      "type": "string",
      "minLength": 7,
      "maxLength": 30,
      "description": "Which of the account's WhatsApp numbers acts, with country code, as listed in whatsapp_numbers from get_account_context. Only matters when the account has several numbers. Omit for the account's first number."
    }
  },
  "required": [
    "idempotencyKey"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "anyOf": [
    {
      "required": [
        "phoneNumber"
      ]
    },
    {
      "required": [
        "phoneNumbers"
      ]
    }
  ]
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "operation_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "completed"
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "result": {
      "type": "object",
      "properties": {
        "changed": {
          "type": "boolean"
        },
        "changed_count": {
          "type": "number"
        },
        "unchanged_count": {
          "type": "number"
        },
        "phone_number": {
          "type": "string"
        },
        "phone_numbers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "action": {
          "type": "string"
        },
        "mode": {
          "type": "string"
        }
      },
      "required": [],
      "additionalProperties": true
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "operation_id",
    "status",
    "result"
  ],
  "additionalProperties": true
}