🎯 Description
Complete comprehensive API documentation using OpenAPI 3.0 specification with interactive Swagger UI.
📋 Tasks
1. OpenAPI Specification
2. Authentication Endpoints
3. User Endpoints
4. OAuth Endpoints
5. MFA Endpoints
6. Organization Endpoints
7. API Key Endpoints
8. Webhook Endpoints
9. Payment Endpoints
10. Admin Endpoints (require admin role)
11. Swagger UI Setup
12. Additional Documentation
✅ Acceptance Criteria
⏱️ Estimated Effort
8-12 hours
🎯 Description
Complete comprehensive API documentation using OpenAPI 3.0 specification with interactive Swagger UI.
📋 Tasks
1. OpenAPI Specification
openapi.yaml(oropenapi.json)https://signula.id/apiX-API-Key)Authorization: Bearer {token})2. Authentication Endpoints
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/verify-email- Verify email addressPOST /api/auth/reset-password- Request password resetPOST /api/auth/confirm-reset- Confirm password reset3. User Endpoints
GET /api/users/me- Get current user profilePUT /api/users/me- Update current user profileDELETE /api/users/me- Delete current user accountGET /api/users/me/activity- Get user activity logPOST /api/users/me/export- Export user data (GDPR)4. OAuth Endpoints
GET /api/oauth/providers- List available OAuth providersGET /api/oauth/{provider}/authorize- Initiate OAuth flowGET /api/oauth/{provider}/callback- OAuth callback handlerPOST /api/oauth/{provider}/link- Link OAuth accountDELETE /api/oauth/{provider}/unlink- Unlink OAuth account5. MFA Endpoints
POST /api/mfa/totp/setup- Setup TOTPPOST /api/mfa/totp/verify- Verify TOTP codePOST /api/mfa/totp/disable- Disable TOTPPOST /api/mfa/webauthn/register- Register WebAuthn credentialPOST /api/mfa/webauthn/authenticate- Authenticate with WebAuthnGET /api/mfa/recovery-keys- Get recovery keysPOST /api/mfa/recovery-keys/regenerate- Regenerate recovery keys6. Organization Endpoints
GET /api/organizations- List user's organizationsPOST /api/organizations- Create organizationGET /api/organizations/{id}- Get organization detailsPUT /api/organizations/{id}- Update organizationDELETE /api/organizations/{id}- Delete organizationGET /api/organizations/{id}/members- List organization membersPOST /api/organizations/{id}/members- Add memberDELETE /api/organizations/{id}/members/{userId}- Remove member7. API Key Endpoints
GET /api/keys- List user's API keysPOST /api/keys- Generate new API keyPUT /api/keys/{id}- Update API key (rotate)DELETE /api/keys/{id}- Delete API key8. Webhook Endpoints
GET /api/webhooks- List user's webhooksPOST /api/webhooks- Create webhookGET /api/webhooks/{id}- Get webhook detailsPUT /api/webhooks/{id}- Update webhookDELETE /api/webhooks/{id}- Delete webhookGET /api/webhooks/{id}/deliveries- List webhook deliveriesPOST /api/webhooks/{id}/test- Test webhook9. Payment Endpoints
GET /api/payments- List user's paymentsPOST /api/payments/checkout- Create checkout sessionGET /api/payments/{id}- Get payment detailsPOST /api/payments/{id}/refund- Request refundGET /api/subscriptions- List subscriptionsPOST /api/subscriptions/{id}/cancel- Cancel subscription10. Admin Endpoints (require admin role)
GET /api/admin/users- List all usersGET /api/admin/users/{id}- Get user detailsPUT /api/admin/users/{id}- Update userDELETE /api/admin/users/{id}- Delete userGET /api/admin/audit-log- Get audit logGET /api/admin/rate-limits- Get rate limit rulesGET /api/admin/settings- Get system settingsPUT /api/admin/settings- Update system settings11. Swagger UI Setup
/api/docs/)openapi.yamlhttps://signula.id/api/docs/12. Additional Documentation
✅ Acceptance Criteria
/api/docs/⏱️ Estimated Effort
8-12 hours