Skip to main content

API overview

Moveat APIs are not currently intended as a third-party integration product. They exist to support the web app and Agent. This page explains API areas at a high level.

API categories

CategoryPrefixConsumerPurpose
Public product APIs/v1Web appUser-facing product actions.
Internal Agent APIs/internal/v1AgentService-to-service operations.
Health APIs/healthzInfraContainer and uptime checks.
Swagger docs/docs, /agent-docsEngineeringAPI inspection and debugging.

Public APIs

Public APIs support web flows:
  • Auth signup/login/logout.
  • Google login.
  • Current session/user info.
  • Onboarding.
  • Profile and context reads.
  • Channel linking.
  • Meal tracking.
  • Weight tracking.
  • Workout tracking.
These APIs authenticate with the user’s web session.

Internal APIs

Internal APIs support Agent flows:
  • Resolve a user by linked channel.
  • Fetch user context.
  • Log meal entries idempotently.
  • Fetch today’s nutrition summary.
  • Log workouts and weight entries.
These APIs authenticate with an internal service token. They should be clearly marked as Agent-only in Swagger.

Error model

API errors should be structured and include a correlation ID when possible. This allows operations to search logs in Grafana/Loki. Common error types:
StatusMeaning
400Invalid request payload.
401Missing or invalid session/token.
403Authenticated but not allowed.
404Resource not found.
409Conflict, such as incomplete onboarding or idempotency conflict.
429Rate limited.
500Unexpected server error.

Swagger usage

Swagger is useful for inspecting the live API contract. The business documentation should explain flows and decisions; Swagger should explain exact request and response shapes.