Skip to main content

Interactive API Documentation

Using the API Explorer

The embedded Swagger UI above provides interactive API documentation. You can:

  1. Browse all available endpoints organized by module (Speakers, Sittings, Motions, etc.)
  2. View request/response schemas with detailed field descriptions
  3. Try out endpoints directly from the browser (requires authentication)
  4. Download the OpenAPI specification in JSON or YAML format

Authentication

To test endpoints in Swagger UI:

  1. Click the "Authorize" button at the top right
  2. Enter your JWT token in the format: Bearer <your-token>
  3. Click "Authorize" to save
  4. All subsequent requests will include your authentication token

Getting a Token

To obtain a JWT token:

POST /api/v1/auth/login
Content-Type: application/json

{
"email": "your-email@example.com",
"password": "your-password"
}

The response will include an accessToken that you can use for authentication.

Troubleshooting

Swagger UI doesn't load

If the Swagger UI iframe doesn't load:

  • Ensure the backend server is running - The documentation is served by the NestJS backend
  • Check that you're accessing docs through the backend URL - Not the standalone Docusaurus dev server
  • Verify CORS settings if accessing from a different domain
  • Try accessing Swagger UI directly at /api/v1/docs in a new tab

Authentication errors

If you receive 401 Unauthorized errors:

  • Verify your token is valid - Tokens expire after a set period
  • Check the token format - Must be Bearer <token>, not just <token>
  • Ensure you have the required permissions - Some endpoints require specific roles

CORS errors

If you see CORS errors in the browser console:

  • The backend must be configured to allow requests from your domain
  • Contact your system administrator to update CORS settings
  • For development, ensure you're accessing both docs and API from the same origin

Direct Access

If the embedded Swagger UI is not working, you can access it directly:

Swagger UI: /api/v1/docs

This will open the Swagger UI in a new page without the documentation wrapper.