Skip to main content

Base URLs

The TripLoom API uses versioned endpoints with the /v1 prefix:
  • Production: https://api.triploom.com/v1
  • Development: http://localhost:8080/v1
All API endpoints require authentication except for the health check endpoint.

API architecture

TripLoom’s API is built with:
  • Framework: Go with Fiber v2
  • Authentication: Supabase JWT validation
  • CORS: Configured for allowed origins with support for Authorization headers

Endpoints

The API provides the following endpoints:
MethodEndpointDescription
POST/v1/ai/chatGeneral AI chat interaction
POST/v1/ai/planner/chatTrip planning chat interaction
GET/v1/ai/conversations/:tripIdList conversations for a trip
GET/v1/ai/conversations/:conversationId/messagesList messages in a conversation
POST/v1/ai/context/refreshRefresh AI context
GET/healthzHealth check (no auth required)

Request headers

All authenticated requests must include:
Authorization: Bearer <supabase_jwt_token>
Content-Type: application/json
The Authorization header must use the Bearer scheme with a valid Supabase JWT token.

Response format

All API responses follow a consistent JSON structure: Success response:
{
  "ok": true,
  "data": {
    // Response data
  }
}
Error response:
{
  "ok": false,
  "error": "error description"
}

Error codes

Status CodeDescription
200Success
400Bad request
401Unauthorized - invalid or missing authentication
404Resource not found
500Internal server error

CORS configuration

The API supports cross-origin requests with the following allowed headers:
  • Origin
  • Content-Type
  • Accept
  • Authorization
Ensure your origin is configured in the allowed origins list or requests will be blocked by CORS policy.

Health check

The health check endpoint is available without authentication:
curl https://api.triploom.com/healthz
Response:
{
  "ok": true,
  "origins": ["https://app.triploom.com"]
}

Build docs developers (and LLMs) love