mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 20:28:04 +01:00
- Added intelligent onboarding with AI analysis and personalized recommendations - Implemented organization creation with founder membership and role-based access - Built 11 production APIs for full entity relationships: * Profile endpoints: campaigns, projects, organizations * Organization endpoints: campaigns, projects, member management * Project endpoints: campaigns, add/remove campaigns * Campaign endpoints: stats and enhanced detail - Enhanced UX with guest-first campaign creation flow - Fixed sidebar naming consistency (Campaigns vs Fundraising) - Improved onboarding with interactive category cards and clean animations - Added comprehensive documentation and integration guides - Implemented proper JSX structure and TypeScript fixes
3.3 KiB
3.3 KiB
created_date, last_modified_date, last_modified_summary
| created_date | last_modified_date | last_modified_summary |
|---|---|---|
| YYYY-MM-DD | YYYY-MM-DD | Initial creation |
API Endpoint: [Endpoint Name]
Overview
Brief description of what this API endpoint does and its purpose in the system.
Endpoint
METHOD /api/path/to/endpoint
Authentication
- Required: [Yes/No]
- Authentication method: [Bearer token/API key/etc.]
- Required permissions: [List of required permissions]
Request
Headers
Content-Type: application/json
Authorization: Bearer <token>
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The unique identifier |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit |
number | No | 20 | Maximum number of results to return |
offset |
number | No | 0 | Number of results to skip |
Request Body
interface RequestBody {
name: string;
description?: string;
metadata?: Record<string, any>;
}
Example:
{
"name": "Example Item",
"description": "This is an example",
"metadata": {
"tags": ["example", "demo"]
}
}
Response
Success Response (200)
interface SuccessResponse {
success: true;
data: ResponseData;
message: string;
}
Example:
{
"success": true,
"data": {
"id": "123",
"name": "Example Item",
"created_at": "2024-01-01T00:00:00Z"
},
"message": "Item created successfully"
}
Error Responses
400 Bad Request
{
"error": "Validation failed",
"details": [
{
"field": "name",
"message": "Name is required"
}
]
}
401 Unauthorized
{
"error": "Authentication required"
}
403 Forbidden
{
"error": "Insufficient permissions"
}
404 Not Found
{
"error": "Resource not found"
}
500 Internal Server Error
{
"error": "Internal server error"
}
Rate Limiting
- Limit: [X requests per time period]
- Example: 100 requests per minute
Examples
cURL
curl -X POST \
https://api.example.com/api/endpoint \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-token" \
-d '{
"name": "Example Item",
"description": "Example description"
}'
JavaScript (fetch)
const response = await fetch('/api/endpoint', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
name: 'Example Item',
description: 'Example description'
})
});
const result = await response.json();
Validation Rules
name: Required, string, 1-100 charactersdescription: Optional, string, max 500 charactersmetadata: Optional, valid JSON object, max 10KB
Error Handling
- All errors follow the standard error response format
- Validation errors include detailed field-level information
- Network errors should be retried with exponential backoff
Related Endpoints
GET /api/endpoint- List all itemsGET /api/endpoint/{id}- Get specific itemPUT /api/endpoint/{id}- Update itemDELETE /api/endpoint/{id}- Delete item
Changelog
- YYYY-MM-DD: Initial implementation
- YYYY-MM-DD: Added validation for metadata field