FleetTrained API
Connect driver training to your TMS, HR, onboarding or safety software. Add drivers, assign courses, send reminders, track status and pull certificates and signed acknowledgment forms, all from your own system.
Authentication
Send your key in the Authorization header on every request. Keys start with ft_live_ and are shown once
when you create them. Keep them on your server: a key can read and change all of your training records. If a key leaks, revoke it
on the API page and create a new one.
curl https://fleettrained.com/api/v1/account \ -H "Authorization: Bearer ft_live_xxxxxxxxxxxxxxxxxxxxxxxx"
Base URL: https://fleettrained.com/api/v1. Requests and responses are JSON (send Content-Type: application/json).
Times are ISO-8601 in UTC, like 2026-11-17T15:00:00Z. Wherever you pass a time you can also use Unix seconds.
How a training works
An open assignment (assigned or passed) can be cancelled. The assignment id is the
token in the driver's training link. The usual integration: add or sync drivers, assign courses when someone is hired or gets a
violation, listen for assignment.completed, then store the certificate JPEG and acknowledgment PDF in the driver's file.
Errors
Errors use normal HTTP status codes and always have this shape:
{"error": {"code": "driver_not_found", "message": "No driver 99 on your roster."}}
400 | Something in the request is missing or invalid |
401 | Missing, invalid or revoked API key |
403 | plan_required: the company isn't on the Full Library plan (any more) |
404 | Not found, or it belongs to another company |
409 | Not possible in the current state, e.g. cancelling a completed training |
429 | Rate limit, reminder too soon, or assignment cap. Wait for Retry-After seconds. |
Limits & pagination
120 requests per minute per key. Up to 200 assignments per request, 400 per hour and 800 per day. Loading a big fleet for the first time? Email orders@fleettrained.com and we'll raise it.
List endpoints take limit (1 to 200, default 50) and offset, and return total and has_more.
Account
Your account
/api/v1/account{
"company": {"id": 36, "name": "Acme Freight LLC", "email": "safety@acme.com", "usdot": "1234567",
"plan": "library", "brand": {"color": "#FF7A1A", "logo_url": "https://fleettrained.com/app/logo/36"}},
"limits": {"requests_per_minute": 120, "assignments_per_hour": 400,
"assignments_per_day": 800, "assignments_per_request": 200}
}Training stats
/api/v1/stats{
"drivers": 48,
"assignments": {"total": 212, "open": 19, "awaiting_signature": 2, "overdue": 6, "completed": 193, "cancelled": 11},
"completion_rate": 91.0,
"completed_last_30_days": 37,
"average_score_pct": 92.4
}Courses
List courses
/api/v1/coursesid when assigning.q | Search title or topic |
language | Video language, e.g. English, Russian |
source | fleettrained, own (videos you ordered) or upload |
category | e.g. HOS Compliance |
limit, offset | Paging (see Pagination) |
curl "https://fleettrained.com/api/v1/courses?q=brake&language=English" \ -H "Authorization: Bearer $FT_KEY"
{
"courses": [
{"id": "lib_brake-systems", "title": "Brake Systems", "topic": "brake-systems",
"language": "English", "category": "Vehicle Maintenance", "source": "fleettrained"},
{"id": "ord_23_4", "title": "Accident Scene", "topic": "accident-scene",
"language": "English", "category": "Your videos", "source": "own"}
],
"total": 2, "limit": 50, "offset": 0, "has_more": false
}Get a course
/api/v1/courses/{course_id}Quiz languages
/api/v1/languages{"quiz_languages": ["English", "Russian", "Ukrainian", "Spanish", "Polish", "Punjabi", "..."]}Drivers
List drivers
/api/v1/driversq (name or email) or email (exact).curl https://fleettrained.com/api/v1/drivers -H "Authorization: Bearer $FT_KEY"
{
"drivers": [ {
"id": 412,
"name": "Ivan Petrenko",
"email": "ivan@example.com",
"created_at": "2026-10-02T16:20:00Z",
"last_assigned_at": "2026-11-10T14:02:11Z",
"training": {"assigned": 6, "completed": 5, "awaiting_signature": 0, "open": 1, "overdue": 0}
} ],
"total": 48, "limit": 50, "offset": 0, "has_more": false
}Add a driver
/api/v1/drivers"created": false instead of a duplicate, so it's safe to call on every sync. Returns 201 when created, 200 when it already existed.curl -X POST https://fleettrained.com/api/v1/drivers \
-H "Authorization: Bearer $FT_KEY" -H "Content-Type: application/json" \
-d '{"name": "Ivan Petrenko", "email": "ivan@example.com"}'{"id": 412, "name": "Ivan Petrenko", "email": "ivan@example.com",
"created_at": "2026-11-17T15:00:00Z", "last_assigned_at": null, "created": true}Get a driver
/api/v1/drivers/{driver_id}{
"id": 412,
"name": "Ivan Petrenko",
"email": "ivan@example.com",
"created_at": "2026-10-02T16:20:00Z",
"last_assigned_at": "2026-11-10T14:02:11Z",
"training": {"assigned": 6, "completed": 5, "awaiting_signature": 0, "open": 1, "overdue": 0}
}Update a driver
/api/v1/drivers/{driver_id}name and/or email. A new email is also applied to the driver's open assignments, so reminders reach the new address.curl -X PATCH https://fleettrained.com/api/v1/drivers/412 \
-H "Authorization: Bearer $FT_KEY" -H "Content-Type: application/json" \
-d '{"email": "ivan.p@newmail.com"}'Remove a driver
/api/v1/drivers/{driver_id}?cancel_open=true to also cancel their unfinished assignments (for a driver who left), which stops those training links from working.curl -X DELETE "https://fleettrained.com/api/v1/drivers/412?cancel_open=true" \ -H "Authorization: Bearer $FT_KEY"
{"deleted": true, "id": 412, "cancelled_assignments": 1, "note": "Training records and certificates are kept."}A driver's assignments
/api/v1/drivers/{driver_id}/assignmentsAssignments
Assign training
/api/v1/assignments"notify": false.course_id or course_ids | Course id(s) from List courses. Required. |
driver_id, driver or drivers | A roster id, a {"name", "email"} object (added to your roster automatically), or a list mixing both: [{"id": 412}, {"name": "Ana Ruiz", "email": "ana@x.com"}] |
quiz_language | Optional. Defaults to the video's language. |
notify | Optional, default true: email the driver their link. With false, send the training_url yourself (SMS, your app...). |
external_id | Optional, your own id. Sending the same external_id again returns the original assignments instead of creating new ones, so retries are safe. |
"already_open": true rather than a duplicate. Returns 201 if anything was created.curl -X POST https://fleettrained.com/api/v1/assignments \
-H "Authorization: Bearer $FT_KEY" -H "Content-Type: application/json" \
-d '{
"drivers": [{"id": 412}, {"name": "Ana Ruiz", "email": "ana@example.com"}],
"course_ids": ["lib_hos", "lib_pretrip-dvir"],
"quiz_language": "Spanish",
"external_id": "onboarding-2026-11-17"
}'{
"assignments": [ { ...assignment, "already_open": false }, ... ],
"created": 4
}List assignments
/api/v1/assignmentsstatus | assigned, passed, completed, cancelled, or the shortcuts open (assigned + passed) and overdue |
driver_id / driver_email | One driver |
course_id | One course |
external_id | Assignments you created with that id |
created_since | ISO-8601 or Unix time |
updated_since | Anything created, passed, completed or cancelled since then. Best for syncing. |
curl "https://fleettrained.com/api/v1/assignments?status=completed&updated_since=2026-11-01T00:00:00Z" \ -H "Authorization: Bearer $FT_KEY"
Get an assignment
/api/v1/assignments/{assignment_id}{
"id": "q3Xk9w...",
"status": "completed",
"type": "training",
"driver": {"id": 412, "name": "Ivan Petrenko", "email": "ivan@example.com"},
"course": {"id": "lib_hos", "title": "Hours of Service", "topic": "hos", "language": "English"},
"quiz_language": "Ukrainian",
"score": 9, "total": 10,
"training_url": "https://fleettrained.com/t/q3Xk9w...",
"external_id": "tms-7781",
"created_at": "2026-11-10T14:02:11Z",
"passed_at": "2026-11-11T09:40:03Z",
"completed_at": "2026-11-11T09:41:27Z",
"cancelled_at": null,
"last_reminded_at": null,
"overdue": false,
"certificate": {
"reference": "FT-Q3XK9W..",
"view_url": "https://fleettrained.com/t/q3Xk9w.../cert",
"image_url": "https://fleettrained.com/api/v1/assignments/q3Xk9w.../certificate.jpg",
"verify_url": "https://fleettrained.com/verify"
},
"acknowledgment": {
"reference": "FT-Q3XK9W..",
"view_url": "https://fleettrained.com/t/q3Xk9w.../acknowledgment",
"pdf_url": "https://fleettrained.com/api/v1/assignments/q3Xk9w.../acknowledgment.pdf"
}
}Send a reminder
/api/v1/assignments/{assignment_id}/remind429 with Retry-After otherwise). FleetTrained also nudges drivers who passed but never signed, automatically after 2 and 7 days.curl -X POST https://fleettrained.com/api/v1/assignments/q3Xk9w.../remind -H "Authorization: Bearer $FT_KEY"
{"sent": true, "to": "ivan@example.com", "reminded_at": "2026-11-17T15:10:00Z"}Cancel an assignment
/api/v1/assignments/{assignment_id}/cancel409): a certificate is a permanent record. Cancelling twice is harmless.Certificates & forms
List certificates
/api/v1/certificatessince (ISO-8601 or Unix) and driver_id.Certificate details
/api/v1/assignments/{assignment_id}/certificate409 if the driver hasn't finished yet.{"reference": "FT-Q3XK9W..", "view_url": "https://fleettrained.com/t/q3Xk9w.../cert",
"image_url": "https://fleettrained.com/api/v1/assignments/q3Xk9w.../certificate.jpg",
"verify_url": "https://fleettrained.com/verify"}Download certificate (JPEG)
/api/v1/assignments/{assignment_id}/certificate.jpg?download=1 to get it as a file attachment. The first request can take a few seconds; later ones are instant.curl -o certificate.jpg https://fleettrained.com/api/v1/assignments/q3Xk9w.../certificate.jpg \ -H "Authorization: Bearer $FT_KEY"
Acknowledgment details
/api/v1/assignments/{assignment_id}/acknowledgmentDownload acknowledgment (PDF)
/api/v1/assignments/{assignment_id}/acknowledgment.pdf?download=1 makes it an attachment.curl -o acknowledgment.pdf https://fleettrained.com/api/v1/assignments/q3Xk9w.../acknowledgment.pdf \ -H "Authorization: Bearer $FT_KEY"
Webhook
Get webhook settings
/api/v1/webhook{"url": "https://acme.com/hooks/fleettrained", "events": ["assignment.passed", "assignment.completed"],
"secret": "whsec_...", "last_status": "200", "last_delivery_at": "2026-11-17T15:12:40Z"}Set webhook
/api/v1/webhookhttps:// only) and optionally which events to send (all by default). A signing secret is created the first time. You can also do this on the API page of your dashboard.curl -X PUT https://fleettrained.com/api/v1/webhook \
-H "Authorization: Bearer $FT_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://acme.com/hooks/fleettrained", "events": ["assignment.completed"]}'Remove webhook
/api/v1/webhookSend a test event
/api/v1/webhook/testping event right away and tells you what your endpoint answered.{"delivered": true, "response_status": "200"}Receiving webhooks
When an assignment changes we POST JSON to your URL. Events:
assignment.created, assignment.passed, assignment.completed, assignment.cancelled
(plus ping from a test). data is the full assignment object, so you rarely need a follow-up call.
Events fire for assignments made in the dashboard too, not just through the API.
POST /hooks/fleettrained
FT-Event: assignment.completed
FT-Delivery: evt_8c1f0a...
FT-Signature: t=1763392887,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
{"id": "evt_8c1f0a...", "type": "assignment.completed", "created_at": "2026-11-17T15:21:27Z", "data": { ...assignment } }
Verify the signature before trusting a request: compute HMAC-SHA256 of {t}.{raw body} with your
signing secret and compare it with v1. Reject it if t is more than 5 minutes old.
# Python
import hmac, hashlib, time
def verify(secret, header, raw_body):
parts = dict(p.split("=", 1) for p in header.split(","))
expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"]) and abs(time.time() - int(parts["t"])) < 300
// Node.js
const crypto = require("crypto");
function verify(secret, header, rawBody) {
const p = Object.fromEntries(header.split(",").map(s => s.split("=")));
const expected = crypto.createHmac("sha256", secret).update(`${p.t}.${rawBody}`).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(p.v1)) && Math.abs(Date.now() / 1000 - p.t) < 300;
}
Answer with any 2xx within 15 seconds. If you don't, we retry for about 9 hours (10 s, 1 min, 5 min, 30 min, 1 h, 2 h, 6 h).
The same event keeps its FT-Delivery id on every retry, so use it to ignore duplicates.
Objects
Assignment
status is assigned, passed, completed or
cancelled. type is training, or watch_only for the ELP prep video (no quiz or certificate).
certificate and acknowledgment are null until the training is completed.
{
"id": "q3Xk9w...",
"status": "completed",
"type": "training",
"driver": {"id": 412, "name": "Ivan Petrenko", "email": "ivan@example.com"},
"course": {"id": "lib_hos", "title": "Hours of Service", "topic": "hos", "language": "English"},
"quiz_language": "Ukrainian",
"score": 9, "total": 10,
"training_url": "https://fleettrained.com/t/q3Xk9w...",
"external_id": "tms-7781",
"created_at": "2026-11-10T14:02:11Z",
"passed_at": "2026-11-11T09:40:03Z",
"completed_at": "2026-11-11T09:41:27Z",
"cancelled_at": null,
"last_reminded_at": null,
"overdue": false,
"certificate": {
"reference": "FT-Q3XK9W..",
"view_url": "https://fleettrained.com/t/q3Xk9w.../cert",
"image_url": "https://fleettrained.com/api/v1/assignments/q3Xk9w.../certificate.jpg",
"verify_url": "https://fleettrained.com/verify"
},
"acknowledgment": {
"reference": "FT-Q3XK9W..",
"view_url": "https://fleettrained.com/t/q3Xk9w.../acknowledgment",
"pdf_url": "https://fleettrained.com/api/v1/assignments/q3Xk9w.../acknowledgment.pdf"
}
}Driver
training is included when you get or list drivers.
{
"id": 412,
"name": "Ivan Petrenko",
"email": "ivan@example.com",
"created_at": "2026-10-02T16:20:00Z",
"last_assigned_at": "2026-11-10T14:02:11Z",
"training": {"assigned": 6, "completed": 5, "awaiting_signature": 0, "open": 1, "overdue": 0}
}Questions or need an endpoint we don't have yet? Email orders@fleettrained.com.