Skip to content
TablePage.ai Open the app

Make an API Request to Publish and Verify a CSV

Send a CSV to TablePage with an API request, check processing and row counts, then share a reviewed public dataset page.

Share X in f
Wei Hu

An API request is a message your script sends to a service to retrieve data or perform an action. For a publishing workflow, the useful sequence is: send a reviewed table, receive its dataset identifier, check the published rows, and share the page.

This example sends four fictional library-visit records to TablePage. The result should be a public dataset page—not just a successful upload response.

Running the upload publishes the sample data. Use only information cleared for public release; never substitute sensitive records. TablePage describes its public pages as shareable, with a filterable table readers can explore without signing up. TablePage homepage

1. Send the upload request

The commands below use a Bash-compatible shell and curl 7.82.0 or later. curl’s --json option sends a POST request and sets the JSON content and accept headers; --fail-with-body outputs the server’s response body while returning an error for HTTP status codes of 400 or greater. curl manual

curl --silent --show-error --fail-with-body \
  --json '{
    "filename": "fictional-library-visits-example.csv",
    "visibility": "public",
"content": "branch,month,visits\nCentral,2026-01,1240\nRiverside,2026-01,980\nCentral,2026-02,1510\nRiverside,2026-02,1050\n"
}' \
  'https://www.tablepage.ai/api/upload-json'

Here are the parts of that API request:

  • Method: POST sends content for upload.
  • URL: /api/upload-json is the endpoint—the address for this operation.
  • Headers: --json tells the server the body contains JSON.
  • Body: filename, visibility, and content describe what to publish. The \n sequences become line breaks in the CSV text.

As documented on October 26, 2026, this endpoint accepts CSV or TSV text, requires filename and content, and allows unauthenticated uploads. Setting visibility explicitly to public makes the intent clear. Excel files require the multipart /api/upload endpoint instead. TablePage API specification

The documented successful response can include slug, url, visibility, truncated, and malformed. Save the returned url for opening the page and slug for subsequent requests. Do not guess the identifier from the filename. Continue only after receiving a successful upload response with a slug. Upload response specification

2. Check processing and metadata

Paste the returned slug when prompted, then request its status:

printf 'Paste the returned slug: '
IFS= read -r SLUG

curl --silent --show-error --fail-with-body \
  "https://www.tablepage.ai/api/d/$SLUG/status"

The status response includes ready, insights_status, and enrichment_status. If ready is false, wait a few seconds and repeat the status request—not the upload. TablePage’s documented workflow uses ready=true as the signal that processing is ready. Agent workflow

Next, inspect the metadata:

curl --silent --show-error --fail-with-body \
  "https://www.tablepage.ai/api/d/$SLUG/meta"

For this sample, check that row_count is 4 and the headers are branch, month, and visits. The metadata endpoint documents both fields. Metadata specification Investigate any upload truncation or malformed-data indication before sharing. A successful HTTP response is not a substitute for checking the table.

3. Retrieve rows and verify the page

Use a GET request to retrieve the rows, sorted by visits:

curl --silent --show-error --fail-with-body \
  "https://www.tablepage.ai/api/d/$SLUG/query?sort=visits&dir=desc&limit=100&page=0"

Everything after ? is a query parameter controlling the retrieval. TablePage documents sort, dir, limit, and zero-indexed page; the response contains headers, rows, and total. The default limit is 100 and the maximum is 1,000. If total exceeds your requested limit, retrieve subsequent pages rather than assuming one response contains every row. Query endpoint specification

Compare all four returned records with the submitted sample. Then open the returned page URL and check the visible headers, values, sorting, and filtering. Label the page or accompanying text “Fictional example data” before sharing it.

For real datasets, include the source, coverage period, units, missing-value conventions, and retrieval date alongside the shared link. Review your CSV conversion checks before replacing this sample with a spreadsheet export.

If the request fails

The upload specification documents 400 for invalid file, visibility, or content; 401 when authentication is required; and 429 for rate limiting. Read the response body, fix invalid input, or pause as appropriate. Upload response codes

If an upload times out without a response, check the public dataset catalog for the submitted dataset before retrying. If you uploaded with authentication, you can also inspect your owned datasets through /api/me/datasets. Catalog documentation · Owned-dataset endpoint You do not yet know whether the server accepted the upload; another POST may create another published dataset.