Skip to content

Endpoints

All endpoints are relative to the base URL https://api.visihub.com/v1. All requests require authentication unless noted otherwise.

GET /files

Returns a paginated list of files owned by the authenticated user.

Query parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerResults per page (default: 25, max: 100)
GET /files/:id

Returns metadata for a single file.

POST /files

Upload a new spreadsheet file. Use multipart/form-data encoding.

Parameters:

ParameterTypeDescription
filefileThe spreadsheet file (.sheet, .csv, .xlsx)
namestringDisplay name (optional, defaults to filename)
visibilitystringprivate or public (default: private)
PATCH /files/:id

Update file metadata.

Body parameters:

ParameterTypeDescription
namestringNew display name
visibilitystringprivate or public
DELETE /files/:id

Move a file to trash. Files in trash are permanently deleted after 30 days.

GET /files/:id/download

Returns the file contents with appropriate Content-Type and Content-Disposition headers.


GET /users/me

Returns the authenticated user’s profile.

PATCH /users/me

Body parameters:

ParameterTypeDescription
namestringDisplay name

POST /sessions

Sends a magic link to the provided email address. Does not require authentication.

Body parameters:

ParameterTypeDescription
emailstringEmail address
POST /sessions/verify

Exchanges a magic link token for a JWT. Does not require authentication.

Body parameters:

ParameterTypeDescription
tokenstringToken from the magic link

Response:

{
"jwt": "eyJhbGciOi...",
"user": {
"id": "user_abc123",
"email": "user@example.com",
"name": "Jane Doe"
}
}
DELETE /sessions

Revokes the current JWT token.