Skip to content

Import and export ​

Voxt has no "export chat" or "import chat" button that produces or reads a file. Data moves through the two programmatic interfaces:

  • Export reads a chat's messages, attachments, members and summaries through MCP or the RPC API.
  • Import adds earlier history from another service to a chat. The owner starts import mode, the members agree, and the messages are sent through the MCP import tools or the import service of the RPC API. In both cases the owner can run the whole process from an assistant.

Export a chat ​

Exporting needs an API key or an OAuth sign-in. The assistant or script acts as you, so it can read exactly the chats you can read, and nothing else.

  1. Create an API key, or connect an assistant with the OAuth flow, as described in MCP.
  2. Ask your assistant for the export, for example: "Read all messages of the chat Trip photos and save them as a Markdown file with dates and authors." The assistant picks the tools; you do not need to know their names.
  3. For a script, call the tools directly. The tool reference lists them with their arguments.

Screenshot — Asking an assistant to export a chat

A neutral assistant conversation: the request to export the chat Trip photos and the assistant's answer that it read the chat and saved the file.

What can be read:

DataToolsNotes
Messageslist_messages, get_id_rangeOldest first, up to 1,024 messages per call. Continue from the last message ID until nothing is returned. Removed messages are omitted.
Pinned messages and reactionslist_pinned_messages, list_reactions
Photos, videos, files and linkslist_media, list_files, list_linksGrouped by month, newest month first. Every attachment carries a content URL.
Memberslist_members, list_place_members
Chats and placeslist_group_chats, list_peer_chats, list_places, list_place_chats, get_chat, get_placeUse them to find what to export.
Summarieslist_conversations, get_conversationSummarized stretches of a chat, such as a voice session.
Search resultssearch_messages, search_contacts

Things to know before you export a large chat:

  • The tools return pages, not a file. The assistant or script assembles the result.
  • A message that is still being streamed has no text yet. Read that part again later.
  • Edits and removals of messages you already read are not reported. Read the range again if the chat is still active.

Import history into a chat ​

Use import mode to bring a conversation from another service into a Voxt group chat or a place. Messages are stored under their original authors and original dates, so the chat reads as if it had always been in Voxt.

What to know first:

  • Only the owner of the chat or place can start and end an import.
  • It works for group chats and for places. A place-wide import covers every chat in the place. Direct chats cannot be imported into.
  • Every author must be a current member of the chat and must agree. Messages of someone who has not agreed, who has left, or who is not a member are rejected.
  • Imported messages must be dated in the past, each later than the one before, and later than the newest message the chat already has. System messages count, such as members joining, so in a group chat the history must be dated after its members joined. History cannot be inserted before messages that are already there.
  • Nobody can post while import mode is on, the owner included. A place-wide import stops posting in every chat of the place.
  • Imported messages do not send notifications.

Start import mode ​

In the app:

  1. Open the settings of the chat, or of the place for a place-wide import, and select Start import. The entry is shown only to owners.
  2. Confirm Start import mode?. Voxt runs a few final checks for about ten seconds ("Entering import mode"). If someone posted a message while it started, Voxt asks you to remove that message and start again.
  3. The message box is replaced by Maintenance mode for everyone.

An assistant with the MCP import tools can do the same with start_import. The tool does nothing unless the call says that you confirmed, because it stops posting for every member.

Screenshot — Start import in the chat settings

The chat settings of an owner with the Start import entry marked.

Ask the members to allow the import ​

The confirmation dialog, the members' consent and ending the import are shown in Import a chat's history. In short:

  1. Each member opens the chat, selects Allow my messages and media to be imported during this session and confirms Allow import?. A consent cannot be revoked for that import. The owner consents too, to import their own messages.
  2. The owner sees the share of members who agreed ("Consented: 100% (3 out of 3)") and who is still missing.
  3. Messages of members who have not agreed are rejected, so wait until everyone whose history you want has agreed.

Members cannot write in the chat during the import, so the owner cannot remind them there. Message them in your direct chats instead; those stay open. An assistant can do this: get_import lists the members who have not agreed, each with the direct chat you have with them, and the assistant posts a reminder there and checks again until the share you want has agreed.

Send the messages ​

While import mode is on, the owner's assistant or program sends the history:

  1. Read the current import (get_import); it carries the import ID that every call needs.
  2. Upload attachments first, for the member who sent them; that member must have agreed. Each upload attaches to one message.
  3. Send messages in batches of 1 to 100, oldest first. Each message has the author, the original time, the text (up to 64 KB), up to 10 attachments and, optionally, the message it replies to. A batch has its own ID: sending the same batch again returns the earlier result, so a retry after a network error does not duplicate messages.
  4. A reply can point only to a message that is already in the chat, so send the message first, in an earlier batch, and use its returned ID.
  5. In a place-wide import, send each message to the specific chat of the place it belongs to. Check the result of every message. A batch can partly succeed: a rejected message comes back with the reason (for example "This member has not consented to import."), and the others are stored.

The MCP tools for these steps are described in Import history. The same service is available to programs through the RPC API, with the data types in Imports data types. MCP's post_message is not an import: it posts as you, dated now.

End import mode ​

When all messages are sent, the owner selects End import in the app, or the assistant calls end_import. Members can post again, and the imported history sits above the first new message. Members who never agreed simply have no messages imported.

Screenshot — Imported history

A chat after an import: earlier messages with their original dates and authors, followed by the first new message.

Example: import a Telegram export ​

The whole import can be done by an assistant that is connected to Voxt through MCP and can read the export folder on your computer, such as Claude Code or another assistant with file access. It needs no program of your own. A chat-only assistant that cannot read your files cannot do it.

Before you start:

  1. In Telegram Desktop, export the chat: open the chat, choose Export chat history, pick Machine-readable JSON and include photos and files if you want them. The export folder contains result.json and folders such as photos and files.
  2. Create the Voxt group chat and add the people who wrote in the Telegram chat. Each one needs a Voxt account and must be a member. Telegram names that have no Voxt member cannot be imported.
  3. Decide how the assistant signs in: with an API key, or with your Voxt account through OAuth (below).
  4. Add Voxt to your assistant as an MCP server (below).

Add Voxt as an MCP server ​

The server address is https://voxt.ai/mcp. There are two ways to sign in. In both, the assistant acts as you.

With an API key. Create a key in Voxt (Settings → API & apps → Create API Key) and pass it in an Authorization: Bearer header. In Claude Code, run:

bash
claude mcp add --transport http voxt https://voxt.ai/mcp --header "Authorization: Bearer $VOXT_API_KEY"

Set VOXT_API_KEY in your terminal first, so the key does not appear in a prompt or in a file.

With OAuth. Leave out the header and the key:

bash
claude mcp add --transport http voxt https://voxt.ai/mcp

Then start Claude Code, run /mcp, select voxt and choose to authenticate. A browser window opens with the Voxt consent page; approve the access and the assistant is connected, with no key to create or store.

Other assistants have a settings page for remote MCP servers or connectors where you enter the same address, and either the header or the sign-in. MCP describes both ways. Ask the assistant to list your Voxt chats to check that the connection works.

Give the instruction ​

Give the assistant an instruction like this. Replace the folder and the chat name.

text
I want to import a Telegram chat export into a Voxt group chat. I am its owner.

Read these pages first. They describe the import tools and the rules:
- https://docs.voxt.ai/users/import-export/
- https://docs.voxt.ai/developers/mcp/tools

Inputs:
- The Telegram export is in the folder D:\exports\trip-chat (result.json, photos, files).
- The target is my Voxt group chat "Trip photos", which the Voxt MCP server can see.

Do this, and stop to ask me where it says so:
1. Read result.json. List the distinct senders (the "from" field) with their message counts, and give the date range. Skip service messages (type "service").
2. Use the Voxt MCP server to find "Trip photos" and list its members. Propose a mapping from Telegram senders to Voxt members and ask me to confirm it. Messages of senders without a Voxt member will be left out.
3. Compare the date of the earliest message with the chat. Imported messages must be later than the chat's newest message, system messages such as "joined" included. If the history starts earlier, tell me and stop.
4. Call get_import to check that no import is running. Tell me that starting the import stops posting for every member of the chat until it ends, and ask me to confirm. Then call start_import with confirm true.
5. Call get_import to see who has not consented. Post a short reminder to each of them in their direct chat (peerChatId), asking them to open "Trip photos" and allow the import. Call consent_to_import for me. Check get_import every minute and tell me the consented share; ask me when to go on.
6. Convert the messages: author = the mapped member's userId, sentAt = the message date in Unix milliseconds (ask me which time zone the export used; Telegram stores local time without a zone), text = the message text (join the pieces when "text" is a list), replyToId = the Voxt ID of the message that reply_to_message_id points to, if that one was imported in an earlier batch.
7. Send the photos and files named in "photo" and "file" first: begin_import_upload, append_upload in chunks of at most 1 MB, finish_import_upload, and put the upload IDs into the message. If there are many large files, import the text first and ask me about the files.
8. Import with import_messages in batches of at most 100, oldest first, with a different batchId for every batch. Check the result of every message and keep a list of the ones that were rejected, with the reason.
9. Read the imported messages back with list_messages and check the count, the authors and the dates against the export. Show me the result and the rejected messages.
10. Do not call end_import until I say so.

Notes on the example:

  • Telegram stores a message time without a time zone. Check the first imported messages against the original chat before sending the rest.
  • Rejected messages do not stop the batch. Fix the cause (a missing member, a sender who has not allowed the import, a time that is out of order) and send them again in a new batch.
  • Messages that cannot be mapped are left out, so keep the Telegram export if you need the full record.
  • Each file travels in 1 MB pieces through the assistant, so a chat with many large files takes many calls. Text alone is quick.