Skip to content
Shortcut: /, ⌘K or Ctrl+K

Blocklist

View as Markdown

List blocked contacts

GET/graph/whatsapp/{version}/{phoneNumberId}/block_usersGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
sessions:read

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Query parameters

  • limitstringpattern^[1-9][0-9]{0,4}$

    Specifies limit for this query parameter.

  • afterstringmax length512

    Specifies after for this query parameter.

  • beforestringmax length512

    Specifies before for this query parameter.

Responses

GET /graph/whatsapp/{version}/{phoneNumberId}/block_userscURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "messaging_product": "whatsapp",
      "wa_id": "string",
      "user_id": "string",
      "parent_user_id": "string"
    }
  ]
}

Block

POST/graph/whatsapp/{version}/{phoneNumberId}/block_usersGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Body

  • messaging_productstring

    Always whatsapp. Added when omitted.

    Allowed valueswhatsapp
  • block_usersarray of objectrequireditems1–1000

    1 to 1,000 people.

    Show 2 child fields

Responses

POST /graph/whatsapp/{version}/{phoneNumberId}/block_userscURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "block_users": [
    {
      "user": "+16505551234",
      "user_id": "US.13491208655302741918"
    }
  ]
}'
Response
{
  "block_users": {
    "added_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string"
      }
    ],
    "removed_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string"
      }
    ],
    "failed_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string",
        "errors": [
          {
            "message": "string",
            "code": 131047,
            "error_data": {
              "details": null
            }
          }
        ]
      }
    ]
  }
}

Unblock

DELETE/graph/whatsapp/{version}/{phoneNumberId}/block_usersGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Body

  • messaging_productstring

    Always whatsapp. Added when omitted.

    Allowed valueswhatsapp
  • block_usersarray of objectrequireditems1–1000

    1 to 1,000 people.

    Show 2 child fields

Responses

DELETE /graph/whatsapp/{version}/{phoneNumberId}/block_userscURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X DELETE "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "block_users": [
    {
      "user": "+16505551234",
      "user_id": "US.13491208655302741918"
    }
  ]
}'
Response
{
  "block_users": {
    "added_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string"
      }
    ],
    "removed_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string"
      }
    ],
    "failed_users": [
      {
        "input": "string",
        "wa_id": "string",
        "user_id": "string",
        "errors": [
          {
            "message": "string",
            "code": 131047,
            "error_data": {
              "details": null
            }
          }
        ]
      }
    ]
  }
}