Skip to main content

Endpoint Reference

Audience: developers integrating with Userdocks API and maintainers documenting route behavior.

This section documents REST endpoints as implemented in src/api/routes.

Base Paths

  • External API: /api/v1
  • Internal API: /api/v1/internal

Auth Modes

  • Public endpoints: no bearer/API key middleware
  • Bearer endpoints: Authorization: Bearer <jwt>
  • API key endpoints: x-api-key, x-client-id, x-api-key-type

Standard Error Envelope

The Fastify error handler returns errors in this shape:

{
"errors": [
{
"validation": "error",
"code": "[EXXXX]",
"message": "..."
}
]
}

Coverage in This Docs Pass

  • Total route handlers documented: 105
  • External handlers documented: 35
  • Internal handlers documented: 70

Notes:

  • Path and schema names are listed exactly as currently implemented.
  • Some handlers have naming/path inconsistencies (for example, one-time payment vs subscription delete paths); this documentation reflects current behavior, not intended behavior.

Navigation mirrors route folders as closely as possible, split by:

  • external/public
  • external/private-bearer
  • external/private-api-key
  • internal/public
  • internal/private-bearer