# HTML Table Maker > HTML Table Maker converts Excel spreadsheets into interactive, embeddable HTML tables for websites. ## Product - Import .xlsx/.xls files and configure filters, sorting, paging, and styling - Embed tables via iframe snippet on any website - Tier-based limits on table count and monthly embed views - Large tables (10k+ rows) use server-side async queries ## When to use the API vs embed HTML - Use **embed HTML** when you only need to display a table on a webpage - Use the **Agent API** when you need to create/update tables programmatically, query data as JSON, or integrate with automation/AI tools ## Documentation - Human guide: https://htmltablemaker.com/Documentation/AgentApi - OpenAPI (dev): https://htmltablemaker.com/swagger ## Authentication **Option A — Register via API (for agents):** ```bash curl -X POST -H "Content-Type: application/json" \ -d '{"email":"agent@example.com","password":"min7chars","apiKeyName":"default"}' \ https://htmltablemaker.com/api/v1/auth/register ``` Returns `apiKey` once. Email is auto-confirmed. **Option B — Web account:** Create key from Account settings or `POST /api/v1/api-keys` while logged in. Pass on every authenticated request: ``` Authorization: Bearer htm_live_YOUR_KEY ``` ## API Base URL https://htmltablemaker.com/api/v1 ## Account and billing (API key required unless noted) - `POST /auth/register` — create account + API key (public, rate limited) - `GET /account` — tier, subscription status, limits - `POST /billing/checkout` — start Stripe checkout; body `{"tier":"basic|plus|pro|enterprise|enterprise_trial"}` - `GET /billing/checkout/{sessionId}` — poll checkout status - `DELETE /billing/subscription` — cancel subscription ## Endpoints (authenticated, API key required) - `GET /tables` — list owned tables - `GET /tables/{id}` — metadata; `?includeRows=true&page=1&pageSize=50` for row data - `POST /tables/{id}/query` — filter/sort/page JSON query - `POST /tables` — multipart create from Excel (fields: file, name, sheetName, options JSON) - `PUT /tables/{id}/data` — multipart re-import Excel - `PATCH /tables/{id}` — update name/options JSON - `DELETE /tables/{id}` — delete table - `GET /tables/{id}/embed` — embedUrl, shareUrl, iframeHtml - `GET /google-sheets/connection` — connected status + connectUrl - `POST /tables/from-google-sheet` — create table from linked sheet (JSON body) - `PUT /tables/{id}/google-sheet` — link existing table to sheet - `GET /tables/{id}/google-sheet` — sync status - `POST /tables/{id}/google-sheet/sync` — force sync now - `DELETE /tables/{id}/google-sheet` — disconnect sheet ## Google Sheets agent flow 1. `GET /google-sheets/connection` — if not connected, human opens `connectUrl` 2. `POST /tables/from-google-sheet` with spreadsheetUrl and sheetName 3. Sheet edits sync automatically; use sync endpoint for immediate refresh ## Public endpoints (no auth) - `GET /public/tables/{id}` — embed-parity metadata + initial rows - `POST /public/tables/{id}/query` — public JSON query ## Example: agent onboarding ```bash # 1. Register curl -X POST -H "Content-Type: application/json" \ -d '{"email":"agent@example.com","password":"secret123","apiKeyName":"agent"}' \ https://htmltablemaker.com/api/v1/auth/register # 2. Start checkout for Pro tier curl -X POST -H "Authorization: Bearer htm_live_..." \ -H "Content-Type: application/json" \ -d '{"tier":"pro"}' \ https://htmltablemaker.com/api/v1/billing/checkout # 3. Open checkoutUrl in browser, then poll curl -H "Authorization: Bearer htm_live_..." \ https://htmltablemaker.com/api/v1/account ``` ## Example: create table ```bash curl -X POST -H "Authorization: Bearer htm_live_..." \ -F "file=@report.xlsx" \ -F "name=Q1 Report" \ https://htmltablemaker.com/api/v1/tables ``` ## Example: query public table ```bash curl -X POST -H "Content-Type: application/json" \ -d '{"tableId":"TABLE_ID","page":1,"itemsPerPage":50}' \ https://htmltablemaker.com/api/v1/public/tables/TABLE_ID/query ``` ## MCP (AI agents) Endpoint: `https://htmltablemaker.com/mcp` Public catalog — connect without a key to list tools. Call `register_account` to sign up and receive an API key; store it as `Authorization: Bearer htm_live_...` in mcp.json / connector headers, then reload the MCP server. Or use an existing key from /Account. Human guide: https://htmltablemaker.com/Documentation/Mcp Tools: register_account, get_account, create_checkout_session, get_checkout_status, list_tables, create_table_from_file, update_table_data, update_table_options, get_embed_code, query_table, preview_table, delete_table, and Google Sheets sync/status/disconnect helpers. When to preview vs embed vs query: - `preview_table` — show a table inline in the conversation (does not consume monthly embed views). - embed HTML (`/EmbedTable`) — publish a table on a website (counts toward monthly embed views). - `query_table` — read table data as JSON for further processing.