Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/shadownrx/apisquare/llms.txt

Use this file to discover all available pages before exploring further.

The /api/healthcheck endpoint is a lightweight liveness probe. It always returns HTTP 200 with a JSON body confirming the service is running. No authentication is required, and the endpoint performs no database or external service calls — making it safe to poll frequently without side effects.

Request

curl https://your-app.vercel.app/api/healthcheck

Response

HTTP 200 OK
{
  "status": "ok",
  "message": "Bot de reservas está activo!",
  "timestamp": "2024-01-15T14:30:00.000Z"
}

Response Fields

status
string
required
Always "ok". A value other than "ok" is never returned by this endpoint.
message
string
required
Human-readable status message confirming the bot service is running.
timestamp
string
required
ISO 8601 timestamp (UTC) of the exact moment the health check was performed. Generated from new Date().toISOString() at request time.

Use Cases

  • Vercel deployment health checks — point Vercel’s built-in health check URL at /api/healthcheck to gate traffic during deployments.
  • Uptime monitoring — configure tools like UptimeRobot or Betterstack to poll this endpoint every 60 seconds and alert on non-200 responses.
  • Webhook registration verification — call this endpoint after registering the Telegram webhook to confirm the deployment is live and reachable before sending bot traffic.

GET /api — Service Index

The root API route (GET /api) returns a similar liveness payload along with a map of available public endpoints. Useful for a quick sanity check or service discovery. Request
curl https://your-app.vercel.app/api
Response — HTTP 200 OK
{
  "status": "ok",
  "message": "Bot de reservas Square está activo!",
  "endpoints": {
    "webhook": "/api/webhook",
    "healthcheck": "/api/healthcheck"
  }
}
status
string
required
Always "ok".
message
string
required
Human-readable confirmation that the service is active.
endpoints
object
required
A map of named public endpoint paths. Currently lists webhook and healthcheck.
Both GET /api and GET /api/healthcheck are safe to use as uptime probe targets. Prefer /api/healthcheck when you need the timestamp field for latency tracking, and GET /api when you want to confirm endpoint paths without consulting documentation.

Build docs developers (and LLMs) love