API Getting Started

Welcome to the DNLearn API documentation.

Overview

The DNLearn API allows you to:

  • Integrate DNLearn with other systems
  • Automate administrative tasks
  • Build custom applications
  • Extend platform functionality

Base URL

All API requests should be made to:

https://your-org.dnlearn.org/api/v1

Authentication

API Keys

1. Admin > API > Generate Key

2. Copy your API key

3. Store securely (never share)

Making Requests

Include the API key in the header:

Authorization: Bearer YOUR_API_KEY

Request Format

Content Type

All requests should include:

Content-Type: application/json

Request Body

Send JSON in the request body:

{
  "name": "Example Course",
  "description": "An example"
}

Response Format

Success Response

{
  "success": true,
  "data": {
    "id": "course_123",
    "name": "Example Course"
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Name is required"
  }
}

Rate Limits

  • 1000 requests per minute
  • Burst: 100 requests per second
  • Exceeded: 429 Too Many Requests

Pagination

List endpoints support pagination:

GET /courses?limit=20&offset=0

Response includes:

{
  "data": [...],
  "pagination": {
    "total": 100,
    "limit": 20,
    "offset": 0
  }
}

Getting Help

  • API Support: api@dnlearn.org
  • Developer Forum: community.dnlearn.org
  • Status Page: status.dnlearn.org