The forklift simulator is wired up. The vendor's developer has the endpoint, the key, and the secret. They send the first result, Dana Whitfield's 85, and the learning record store answers:
HTTP/1.1 400 Bad Request
id must be a UUIDThey fix the id and send it again. Another 400, with a different message. Then another. Each round trip finds one more thing, and nobody knows how many are left.
A 400 Bad Request from an LRS means the statement, or the request carrying it, broke a rule of the xAPI specification. The LRS checked it before storing anything, so nothing was saved. The statement is the first place to look, and a handful of mistakes are easy to make: an email address that isn't written as a mailto: address, a verb that's a word instead of an IRI, a score on the wrong scale, a date in the wrong format.
This guide walks through that list with a broken and a fixed version of each, covers the 400s that have nothing to do with the statement, and shows how to find every problem in one pass. If you're still deciding whether you need an LRS at all, start with LRS vs LMS.
What a 400 Means, and What It Doesn't
The status code tells you where to look before you read a word of the message.
| Status | What it means | Where to look |
|---|---|---|
| 200 or 204 | Stored | Nowhere. It worked. |
| 400 | The statement or the request is malformed | The JSON you sent, then the headers |
| 401 | The key or secret is wrong | The credential |
| 403 | The credential is valid but isn't allowed to do this | The credential's permissions |
| 409 | A different statement already uses this id | How you generate ids |
A 400 is the LRS doing its job. The specification tells an LRS to refuse a statement that breaks the rules, because a store full of almost-valid records is worse than an error on day one.
The messages in this guide are the ones the edaxu LRS returns. Another LRS will word them differently, and some are stricter or looser about the edges. The rules come from xAPI 1.0.3, so the fixes apply wherever you send the statement. Read the xAPI 1.0.3 data rules
The Statement Behind the Error
This is what the simulator sent. It reads fine to a person, which is exactly the problem.
{
"id": "attempt-1042",
"actor": {
"name": "Dana Whitfield",
"mbox": "dana.whitfield@example.com"
},
"verb": { "id": "completed" },
"object": {
"id": "https://simulator.example.com/activities/forklift-pre-shift-inspection"
},
"result": {
"score": { "scaled": 85 },
"success": "true"
},
"timestamp": "11/20/2026 2:05 PM"
}There are six mistakes in it. The LRS reported one, because it stops at the first rule a statement breaks. That's why fixing a statement by sending it over and over is slow.
Here's the same statement with all six fixed:
{
"id": "6f1c2d54-9a3e-4a0b-8d57-2f0a4c1b9e21",
"actor": {
"name": "Dana Whitfield",
"mbox": "mailto:dana.whitfield@example.com"
},
"verb": {
"id": "http://adlnet.gov/expapi/verbs/completed",
"display": { "en-US": "completed" }
},
"object": {
"id": "https://simulator.example.com/activities/forklift-pre-shift-inspection"
},
"result": {
"score": { "scaled": 0.85, "raw": 85, "min": 0, "max": 100 },
"success": true
},
"timestamp": "2026-11-20T14:05:00Z"
}The sections below take the mistakes one at a time.
The Common Mistakes, One at a Time
The email address isn't a mailto: address
The message: actor.mbox must be a mailto: IRI
"actor": { "mbox": "dana.whitfield@example.com" }"actor": { "mbox": "mailto:dana.whitfield@example.com" }mbox holds an address in URI form, so it needs the mailto: in front. It's an easy mistake to make, because most other systems a developer works with want a bare email address.
The actor has no identifier, or two
The messages: actor must have exactly one of mbox, mbox_sha1sum, openid, or account and actor must not have more than one Inverse Functional Identifier
An actor is identified by exactly one of four things: mbox, mbox_sha1sum, openid, or account. A name is not an identifier. Sending an email address and an account together is also an error, even though it feels like extra helpful detail.
If the tool knows learners by its own ID instead of an email address, use account, which needs both a homePage and a name:
"actor": {
"name": "Dana Whitfield",
"account": {
"homePage": "https://simulator.example.com",
"name": "operator-1042"
}
}That statement is valid. Whether anyone can find Dana's record afterward is a separate question, and it comes up again near the end of this guide.
The verb is a word
The message: verb.id must be an absolute IRI
"verb": { "id": "completed" }"verb": {
"id": "http://adlnet.gov/expapi/verbs/completed",
"display": { "en-US": "completed" }
}A verb's id is an IRI, which looks like a web address. It doesn't have to open a page. It only has to be the same string every time, so "completed" from one tool matches "completed" from another. The readable word goes in display.
The same rule applies to the object's id. "forklift-pre-shift-inspection" on its own is rejected with object.id must be an absolute IRI.
The score is on the wrong scale
The message: result.score.scaled must be between -1 and 1
"score": { "scaled": 85 }"score": { "scaled": 0.85, "raw": 85, "min": 0, "max": 100 }scaled is a fraction, so 85 percent is 0.85. The number a person would recognize belongs in raw, with min and max to give it meaning. raw has to fall between them, or you get result.score.raw must be between min and max.
Two relatives of this mistake: a score sent as text ("raw": "85" returns result.score.raw must be a number), and a score sent as a bare number where an object belongs ("score": 85 returns result.score must be an object).
True and false are in quotes
The message: result.success must be a boolean
"result": { "success": "true", "completion": "completed" }"result": { "success": true, "completion": true }success and completion are real booleans. No quotes, and no words like "passed" or "completed". This one hides well, because a form library or a spreadsheet export will happily turn true into "true" on the way out.
Dates and durations aren't ISO 8601
The messages: timestamp must be an ISO 8601 timestamp and result.duration must be an ISO 8601 duration
| Sent | Accepted form |
|---|---|
"timestamp": "11/20/2026 2:05 PM" | "timestamp": "2026-11-20T14:05:00Z" |
"timestamp": 1795000000 | "timestamp": "2026-11-20T14:05:00Z" |
"duration": "38 minutes" | "duration": "PT38M12S" |
"duration": "00:38:12" | "duration": "PT38M12S" |
Include the Z or an offset on the timestamp. A time with no zone is a time nobody can place, and "which Friday afternoon" is not a question you want during a training review.
The id isn't a UUID
The message: id must be a UUID
"id": "attempt-1042""id": "6f1c2d54-9a3e-4a0b-8d57-2f0a4c1b9e21"A statement's id is a UUID, and so is context.registration. You can leave id out and the LRS will assign one. It's better to generate your own. If a request times out and the tool sends the same statement again with the same id, the LRS recognizes it and stores it once. Without an id, a retry becomes a second record of the same attempt.
A property is misspelled, empty, or invented
The messages: context has an unknown property: contextActivites, result.response must be a string, result.extensions keys must be IRIs
An LRS rejects any property the specification doesn't define. A typo like contextActivites counts. So does a sensible-looking addition like a top-level "score".
null is rejected too. If you have nothing to report for a property, leave the property out.
Custom data goes in extensions, and each key has to be an IRI:
"extensions": { "hazardsFound": 7 }"extensions": {
"https://simulator.example.com/extensions/hazards-found": 7
}When the Statement Is Fine and the Request Isn't
Sometimes the JSON is perfect and the 400 is about how it was sent. These are the common ones, with the edaxu LRS's wording.
| The LRS said | Status | What to fix |
|---|---|---|
| The X-Experience-API-Version header is required | 400 | Send X-Experience-API-Version: 1.0.3 with every request |
| Statements must be sent as application/json or multipart/mixed | 400 | Set Content-Type: application/json |
| The request body is not valid JSON | 400 | A trailing comma or an unclosed brace. Check the JSON itself |
| The statementId parameter is required | 400 | A PUT stores one statement and needs its id in the URL. Use POST otherwise |
| An attachment has neither a fileUrl nor content in this request | 400 | Give the attachment a fileUrl, or send its content in a multipart request |
| Invalid LRS credentials | 401 | The key or secret is wrong, or was revoked |
| A different statement with id ... already exists | 409 | The tool reused an id for a different statement |
One more behavior catches people out. A batch is all or nothing. Send 200 statements in one request with one bad verb in the middle, and all 200 are refused. The response names the first problem and not which statement it's in. If a tool queues results and sends them in bulk, one malformed record can hold up everyone else's until someone finds it.
Find Every Problem in One Pass
The round trips are the expensive part, so we built a way to skip them. The xAPI Statement Validator runs the same check the edaxu LRS runs when a statement arrives, and reports what it finds across the whole statement instead of stopping at the first rule.
Paste the simulator's statement and it lists five problems at once:
id must be a UUIDactor.mbox must be a mailto: IRIverb.id must be an absolute IRIresult.score.scaled must be between -1 and 1timestamp must be an ISO 8601 timestamp
That's five of the six. The quoted "true" is missing because the validator reports one problem per top-level property at a time, and result already has the score. Fix the score, run it again, and result.success must be a boolean appears. It's two passes instead of six.
You can paste one statement or an array of up to 500, which makes it a quick way to find the one bad record in a batch. There's no account to create, and statements are checked and discarded. Nothing is stored.
What a Validator Can't Tell You
A validator checks the shape of a statement. Some things only show up when a real LRS has real records.
Credentials and permissions. A 401 or a 403 is about the key, not the JSON. In edaxu a credential can be limited to writing statements, so check what the one you were given is allowed to do.
Ids already in use. Whether an id collides with a stored statement depends on what's stored.
Attachments and signatures. The validator checks how an attachment is described. The file itself is checked when the statement is stored.
Whether the record is any use. This is the big one. A statement can pass every rule and still be the wrong record. If the tool identifies Dana by an internal operator ID, the score is stored, and nobody can find it by her name. If the tool sends a score and never says whether it's a pass, the pass column in the export is blank. Valid and useful are different tests, and only the second one matters to your client. The LRS vs LMS guide covers both cases
A Checklist Before Go-Live
- Validate one real statement from the tool. Not the example from the vendor's documentation. The one the tool actually produces for a real attempt.
- Check the identifier. Is it the learner's email on their LMS account, or the tool's own ID? Decide which, on purpose.
- Check pass and fail. Does the statement carry
success, or only a score? - Send the same statement twice. With the same id, you should end up with one record.
- Send a batch with one bad statement. Find out what the tool does when the whole batch is refused. Does it retry forever, drop the batch, or tell someone?
Try It With Your Own Statement
Paste a statement into the xAPI Statement Validator and see what comes back. When it's clean, start a free trial, create a credential under Integrations → Learning Record Store (xAPI) → Credentials, and send it for real. Then look for that 85 in the learning records. Learning records and reporting in edaxu
Frequently Asked Questions
What does 400 Bad Request mean in xAPI?
It means the LRS refused the request because the statement or the request itself breaks a rule of the xAPI specification. Nothing was stored. The response body usually names the first problem the LRS found, such as an actor without a valid identifier or a verb id that isn't an IRI.
Why does an LRS only report one error at a time?
An LRS validates a statement in order and stops at the first rule it breaks, so the response names a single problem. Fix it and the next one appears. A validator that checks the whole statement, like the edaxu xAPI Statement Validator, lists the problems together.
Does an xAPI actor need an email address?
No. An actor needs exactly one identifier, and mbox is only one of four options. The others are mbox_sha1sum, openid, and account. An mbox has to be written as a mailto: address.
What is the difference between score.scaled and score.raw?
scaled is a fraction between -1 and 1, so 85 percent is 0.85. raw is the number as the tool scored it, such as 85, and it has to fall between min and max when those are sent.
Does one invalid statement reject the whole batch?
Yes. When several statements are sent in one request, the LRS stores all of them or none. One invalid statement returns a 400 for the entire batch.
Will an xAPI 2.0 statement work in an xAPI 1.0.3 LRS?
Often, because the statement format is largely the same. The details differ: a statement that sets "version": "2.0.0" is rejected by a 1.0.3 LRS, and the request needs a 1.0.x X-Experience-API-Version header. Ask which version the tool sends and which one the LRS accepts. edaxu accepts xAPI 1.0.3.
Is it safe to paste a real statement into an online validator?
Check what the tool does with it first. Statements name learners. The edaxu validator checks statements in memory and discards them without saving or logging them. If your policy doesn't allow learner data to leave your systems, replace names and identifiers with test values before you paste.
