API quickstart
Five minutes: a token, one call to find your organization and the three cases schools ask for most.
1. Get a personal access token (PAT)
Integrations authenticate with a personal access token (edr_live_…) that acts on your behalf and with your permissions in ONE institution: the one you create it in (Settings → Connections). It is shown only once when created: store it in your secrets manager. Details in Authentication.
export EDURAILS_TOKEN="edr_live_…"2. Find your organization
Almost everything lives under an organization. Ask for yours and keep the organization.id:
curl -s https://api.edurails.com/api/v1/me/organizations \
-H "Authorization: Bearer $EDURAILS_TOKEN"{
"organizations": [
{ "organization": { "id": "3f0c…", "name": "IES Ejemplo", … }, "role": "admin" }
],
"active_organization_id": "3f0c…"
}export ORG_ID="3f0c…"3. Syncing learners
For a few people, invite them by email: one invitation per call, with a role and optional cohort. You need to be an admin of the organization.
curl -s -X POST \
https://api.edurails.com/api/v1/organizations/$ORG_ID/members/invite \
-H "Authorization: Bearer $EDURAILS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email": "alumna@ejemplo.edu", "role": "student", "cohort_id": null}'For a whole class, upload a CSV. The import runs in the background: check its status at GET /api/v1/organizations/{org_id}/members/import/{import_id} and download the report when it finishes.
curl -s -X POST \
https://api.edurails.com/api/v1/organizations/$ORG_ID/members/import \
-H "Authorization: Bearer $EDURAILS_TOKEN" \
-F "file=@alumnado.csv"4. Reading a cohort’s progress
As a teacher (or admin) of the cohort: list your cohorts with GET /api/v1/organizations/{org_id}/teacher/cohorts and ask for one’s progress.
curl -s \
https://api.edurails.com/api/v1/organizations/$ORG_ID/teacher/cohorts/$COHORT_ID/progress \
-H "Authorization: Bearer $EDURAILS_TOKEN"5. Verifying a certificate
Public, no token needed: with the certificate code, it returns whether it is valid, the course, the date and the holder with minimal data.
curl -s https://api.edurails.com/api/v1/public/certificates/verify/ABCD-2345-EFGH