Developers

Ethica Public API

The Ethica Public API allows you to programmatically manage employees and assignments, and retrieve requirement information. You can also subscribe to Webhooks to receive real-time notifications when training and policies are assigned or completed.

Authentication

All API endpoints require a Bearer token. You can generate API keys from the Settings > API & Webhooks tab in your dashboard (available to organization owners).

Authorization: Bearer YOUR_API_KEY

Pagination

All index endpoints support pagination via ?page= and ?per_page= query parameters. The default per_page is 50, maximum is 100. Responses include a meta object with pagination details.

Endpoints

Employees

  • GET https://getethica.com/api/v1/employees

    List all employees in your organization.

    View Example Response
    {
      "data": [
        {
          "id": 123,
          "name": "Jane Doe",
          "email": "jane@example.com",
          "hired_at": "2026-01-15",
          "created_at": "2026-02-25T14:32:00.000Z",
          "updated_at": "2026-02-25T14:32:00.000Z",
          "role": {
            "id": 4,
            "name": "Developer"
          }
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 5,
        "total_count": 234,
        "has_next_page": true,
        "has_previous_page": false
      }
    }
  • POST https://getethica.com/api/v1/employees

    Create a new employee.

    Body: { "name": "Jane Doe", "email": "o@org.com", "hired_at": "2026-01-15", "role_name": "Developer" }

    View Example Response
    {
      "id": 124,
      "name": "Jane Doe",
      "email": "o@org.com",
      "hired_at": "2026-01-15",
      "created_at": "2026-02-26T10:00:00.000Z",
      "updated_at": "2026-02-26T10:00:00.000Z",
      "role": {
        "id": 4,
        "name": "Developer"
      }
    }
  • PATCH https://getethica.com/api/v1/employees/:id

    Update an existing employee. You can send an empty string for role_name to remove their assigned role.

    Body: { "name": "Jane Smith" }

Requirements

  • GET https://getethica.com/api/v1/requirements

    List all SCORM courses and policy documents.

    View Example Response
    {
      "data": [
        {
          "id": 456,
          "title": "Harassment Prevention",
          "requirement_type": "scorm",
          "effective_on": null,
          "created_at": "2026-01-10T09:00:00.000Z",
          "updated_at": "2026-01-15T11:20:00.000Z"
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 12,
        "has_next_page": false,
        "has_previous_page": false
      }
    }

Assignments

  • GET https://getethica.com/api/v1/assignments

    List all assignments. Supports identical search parameters as the dashboard.

    Example: /api/v1/assignments?search=status%3Aoverdue+role%3A%22Developer%22

    View Example Response
    {
      "data": [
        {
          "id": 10423,
          "status": "active",
          "due_date": "2026-03-25",
          "exempt": false,
          "completed_at": null,
          "created_at": "2026-02-25T14:32:00.000Z",
          "scorm_data": {
            "cmi.core.score.raw": "85",
            "cmi.core.score.max": "100"
          },
          "updated_at": "2026-02-25T14:32:00.000Z",
          "employee": {
            "id": 123,
            "name": "Jane Doe",
            "email": "jane@example.com"
          },
          "requirement": {
            "id": 456,
            "title": "Harassment Prevention",
            "requirement_type": "scorm"
          }
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 3,
        "total_count": 139,
        "has_next_page": true,
        "has_previous_page": false
      }
    }
  • POST https://getethica.com/api/v1/assignments

    Assign a requirement to an employee.

    Body: { "employee_id": 123, "requirement_id": 456, "due_date": "2026-04-15" }

    View Example Response
    {
      "id": 10424,
      "status": "active",
      "due_date": "2026-04-15",
      "exempt": false,
      "completed_at": null,
      "created_at": "2026-02-26T10:00:00.000Z",
      "scorm_data": {},
      "updated_at": "2026-02-26T10:00:00.000Z",
      "employee": {
        "id": 123,
        "name": "Jane Doe",
        "email": "jane@example.com"
      },
      "requirement": {
        "id": 456,
        "title": "Harassment Prevention",
        "requirement_type": "scorm"
      }
    }
  • GET https://getethica.com/api/v1/employees/:id/assignments

    List assignments for a specific employee. Support ?status=active or ?status=completed.

    View Example Response
    {
      "data": [
        {
          "id": 10423,
          "status": "active",
          "due_date": "2026-03-25",
          "exempt": false,
          "completed_at": null,
          "created_at": "2026-02-25T14:32:00.000Z",
          "scorm_data": {},
          "updated_at": "2026-02-25T14:32:00.000Z",
          "employee": {
            "id": 123,
            "name": "Jane Doe",
            "email": "jane@example.com"
          },
          "requirement": {
            "id": 456,
            "title": "Harassment Prevention",
            "requirement_type": "scorm"
          }
        }
      ],
      "meta": {
        "current_page": 1,
        "total_pages": 1,
        "total_count": 4,
        "has_next_page": false,
        "has_previous_page": false
      }
    }

Webhooks

Configure Webhooks in your dashboard to receive HTTP POST payloads when specific events occur. Webhooks are delivered in JSON format. We send requests to your endpoint containing a X-Ethica-Signature header with an HMAC-SHA256 hash. You can verify the sender identity by generating the same hash on your side using your webhook secret.

Supported Events

  • assignment.assigned — Dispatched when a new training or policy document is assigned to an employee.
  • assignment.completed — Dispatched when an employee completes the training or acknowledges the policy document.

Payload Format

View Example Webhook Payload
{
  "event": "assignment.completed",
  "timestamp": "2026-02-25T14:32:00Z",
  "data": {
    "id": 10423,
    "status": "completed",
    "due_date": "2026-03-25",
    "exempt": false,
    "completed_at": "2026-02-25T14:32:00Z",
    "created_at": "2026-02-01T09:00:00.000Z",
    "scorm_data": {
      "cmi.core.score.raw": "100",
      "cmi.core.score.max": "100",
      "cmi.core.lesson_status": "completed"
    },
    "updated_at": "2026-02-25T14:32:00.000Z",
    "certificate_link": "https://getethica.com/certificate/123e4567-e89b-12d3.../download",
    "employee": {
      "id": 123,
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    "requirement": {
      "id": 456,
      "title": "Harassment Prevention",
      "requirement_type": "scorm"
    }
  }
}