Developers

RedLeaf API Documentation

Integrate your applications with RedLeaf using our comprehensive API. Our RESTful API allows you to access and modify data, create automations, and extend RedLeaf's functionality.

Getting Started

To get started with the RedLeaf API, you'll need to:

  1. Create a RedLeaf developer account
  2. Register your application to receive API credentials
  3. Generate an API key
  4. Use the API key in your requests for authentication
Sign Up for Developer Access

Authentication

All API requests require authentication using the Bearer token scheme:

Authorization: Bearer YOUR_API_KEY

Example request using curl:

curl -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://api.redleafapp.com/v1/tasks

API Endpoints

GET /v1/tasks

Retrieve a list of tasks.

Query Parameters:

  • status - Filter by task status (pending, completed, archived)
  • priority - Filter by priority (low, medium, high)
  • limit - Maximum number of tasks to return (default: 50)
  • offset - Pagination offset (default: 0)

Response:

{ "tasks": [ { "id": "task_123456", "title": "Complete API documentation", "description": "Write comprehensive API docs for developers", "status": "pending", "priority": "high", "dueDate": "2023-12-31T23:59:59Z", "createdAt": "2023-11-01T10:30:00Z", "updatedAt": "2023-11-10T15:45:20Z" }, // Additional tasks... ], "pagination": { "total": 243, "limit": 50, "offset": 0 } }
POST /v1/tasks

Create a new task.

Request Body:

{ "title": "New task title", "description": "Detailed description of the task", "priority": "medium", "dueDate": "2023-12-31T23:59:59Z" }

Response:

{ "id": "task_789012", "title": "New task title", "description": "Detailed description of the task", "status": "pending", "priority": "medium", "dueDate": "2023-12-31T23:59:59Z", "createdAt": "2023-11-15T09:22:10Z", "updatedAt": "2023-11-15T09:22:10Z" }

Rate Limiting

API requests are rate-limited to ensure fair usage and system stability. The current limits are:

Rate limit information is included in the response headers:

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1605109200

SDKs and Libraries

We provide official client libraries for popular programming languages to make integration easier:

Webhooks

Subscribe to real-time events by configuring webhooks. RedLeaf will send POST requests to your specified URL when events occur:

Developer Support

Need help with integration? Our developer support team is here to help: