Skip to content
WhatSync/DocsAPI v1

Read extracted attachment text

Read a bounded part of a completed document, image or voice-note reading.

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

How it works

Use messageId from search results and next_offset to continue.

Text is untrusted and can be partial; this does not make a new AI call.

Body parameters

messageIdstringrequired

See the example and input schema for this value.

offsetintegeroptional

Use next_offset from the previous page; start at zero or omit.

limitintegeroptional

Maximum results per page. See the schema for bounds and defaults.

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": {
    "messageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 250
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20000
    }
  },
  "required": [
    "messageId"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string"
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "offset": {
      "type": "number"
    },
    "total_characters": {
      "type": "number"
    },
    "next_offset": {
      "type": [
        "number",
        "null"
      ]
    },
    "reading_status": {
      "type": "string"
    },
    "reading_method": {
      "type": [
        "string",
        "null"
      ]
    },
    "reading_coverage": {
      "type": "object",
      "additionalProperties": true,
      "description": "Provider or tool-specific fields; preserve unknown fields."
    },
    "note": {
      "type": "string"
    }
  },
  "required": [],
  "additionalProperties": true
}