Skip to content
WhatSync/DocsAPI v1

Get WhatsApp account context

Check which WhatSync WhatsApp account is connected, whether it is ready, the available history range, and the granted read, prepare, and send capabilities.

POST/api/v1/tools/get_account_contextRead
Key permissions
Read chats and messages
Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work

How it works

Use this before answering questions that depend on coverage or freshness.

Body parameters

No input fields. Send an empty JSON object: {}.

Response

HTTP 200 returns this tool's JSON directly, without an MCP content wrapper. Optional provider fields may be absent or null; check pagination and coverage before treating a page as complete.

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": {},
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "account_email": {
      "type": "string"
    },
    "provider_context": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string"
        },
        "providers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "channel": {
                "type": "string"
              },
              "connected": {
                "type": "boolean"
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sending_enabled": {
                "type": "boolean"
              },
              "connect_url": {
                "type": "string"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [],
            "additionalProperties": true
          }
        },
        "permissions": {
          "type": "object",
          "properties": {
            "settings": {
              "type": "boolean"
            },
            "groups": {
              "type": "boolean"
            },
            "templates": {
              "type": "boolean"
            }
          },
          "required": [],
          "additionalProperties": true
        },
        "routing": {
          "type": "string"
        }
      },
      "required": [],
      "additionalProperties": true
    },
    "connection": {
      "type": "object",
      "additionalProperties": true,
      "description": "Provider or tool-specific fields; preserve unknown fields."
    },
    "history": {
      "type": "object",
      "properties": {
        "message_count": {
          "type": "number"
        },
        "first_message_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_message_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [],
      "additionalProperties": true
    },
    "access": {
      "type": "object",
      "additionalProperties": true,
      "description": "Provider or tool-specific fields; preserve unknown fields."
    }
  },
  "required": [],
  "additionalProperties": true
}