The Organization API lets an organization list, read, and create H5P content, folders, and users programmatically. All data is scoped to the organization that owns the API key.
To learn more about the API specifications and technicalities, visit this guide: Organization API - specification.
Availability
The API must be enabled for the organization. If it is not enabled, every API route responds with 404 Not Foundas if it does not exist.
Base URL
The API is only served on the organization's own subdomain:
https://<org-subdomain>.h5p.com/api
Operations
| Resource | Method | Path | Permission | Description |
|---|---|---|---|---|
| H5P | GET | /h5ps |
h5ps.list |
Paginated list of H5P content (id, title) |
| H5P | GET | /h5ps/{id} |
h5ps.get |
Single H5P content. ?expanded=true adds library, parameters and organization folders |
| H5P | POST | /h5ps |
h5ps.create |
Create H5P content (multipart/form-data). Returns presigned upload targets for media files |
| Folder | GET | /folders |
folders.list |
Paginated list of folders |
| Folder | GET | /folders/{id} |
folders.get |
Single folder |
| Folder | POST | /folders |
folders.create |
Create a private or organization folder |
| User | GET | /users |
users.list |
Paginated list of users. Filter with email (partial match) and role |
| User | GET | /users/{id} |
users.get |
Single user |
| User | POST | /users |
users.create |
Create a user (subject to the organization's user quota) |
List endpoints for H5P content and folders accept created-after and updated-after filters. All list endpoints accept page.
There are no update or delete operations.
Authentication
Every request must include the API key and secret as HTTP headers:
| Header | Value |
|---|---|
X-API-Key |
The public API key (40 characters) |
X-API-Secret |
The API secret (64 characters) |
curl -H "X-API-Key: <api-key>" \
-H "X-API-Secret: <api-secret>" \
https://<org-subdomain>.h5p.com/api/h5psAlways use HTTPS. Treat the secret like a password — never embed it in client-side code.
Key lifecycle
-
Expiry — expired keys are rejected with
401. Organization admins receive an email reminder before a key expires and when it has expired. - Last used — the date a key was last used is tracked (day resolution) and shown in the API key overview.
- Legacy keys — keys created before permissions were introduced have all permissions.
Authorization
After authentication, the key's permissions are checked against the requested operation (see the table above). A missing permission returns 403 Forbidden.
Throttling
The API allows one active request per API key at any time.
- A request that arrives while another request for the same key is in progress is rejected with
429 Too Many Requests. - The lock is released as soon as a request completes successfully (
2xx) or fails validation (422). - For any other error response (e.g.
403,404,500) the lock is not released early and expires after 5 seconds. - Clients should therefore send requests sequentially, and on
429wait briefly (e.g. 1–5 s with backoff) before retrying.
Requests and responses
- Responses are always JSON.
-
POST /h5psandPOST /folderstakemultipart/form-data;POST /userstakes JSON. - IDs are returned as strings.
- Timestamps (in responses and the
created-after/updated-afterfilters) use the formatYYYY-MM-DDTHH:MM:SS, in UTC without a timezone offset, e.g.2026-08-31T14:05:30.
Pagination
List endpoints return 15 items per page in this envelope:
{
"data": [ { "id": "123", "title": "My quiz" } ],
"links": {
"first": "https://<org-subdomain>.h5p.com/api/h5ps?page=1",
"last": "https://<org-subdomain>.h5p.com/api/h5ps?page=7",
"prev": null,
"next": "https://<org-subdomain>.h5p.com/api/h5ps?page=2"
},
"meta": { "current_page": 1, "per_page": 15, "total": 98, "last_page": 7 }
}Iterate by following links.next until it is null.
Status codes
| Code | Meaning |
|---|---|
| 200 | OK |
| 201 | Resource created |
| 401 | Missing, invalid or expired API key/secret |
| 403 | API key lacks permission for the operation, or user quota exceeded |
| 404 | Resource not found, or the API is not enabled for the organization |
| 422 | Validation failed (errors contains per-field messages) |
| 429 | Another request for this API key is still in progress |
| 500 | Unexpected server error |
Error bodies have the form {"error": "..."} or, for validation errors, {"message": "...", "errors": {"field": ["..."]}}.
Creating H5P content with media
POST /h5ps creates the content from a library (e.g. H5P.MultiChoice 1.16) and a JSON parameters string. If the parameters reference local media files, the response contains an uploads array with a presigned S3 POST target for each file (url, fields, maxSizeBytes). Upload each file with a multipart/form-data POST to url, including all fields followed by the file. Upload targets are valid for 30 minutes; the size limit is 20 MB for images/audio and 2 GB for video.
Example: fetch all H5P content
Pseudo code that retrieves every H5P content item, with full details, while respecting the throttling rules.
BASE_URL = "https://<org-subdomain>.h5p.com/api"
HEADERS = {
"X-API-Key": env("H5P_API_KEY"),
"X-API-Secret": env("H5P_API_SECRET"),
"Accept": "application/json"
}
MAX_RETRIES = 5
function request(url):
for attempt in 1..MAX_RETRIES:
response = http.get(url, headers = HEADERS)
if response.status == 200:
return response.json()
if response.status == 429:
// Another request for this key is still active; back off and retry
sleep(min(2 ^ attempt, 10) seconds)
continue
// 401, 403, 404, 422, 5xx are not retryable here
raise ApiError(response.status, response.json())
raise ApiError("Gave up after repeated 429 responses")
function fetchAllH5PContent(updatedAfter = null):
url = BASE_URL + "/h5ps?page=1"
if updatedAfter is not null:
url = url + "&updated-after=" + urlencode(format(updatedAfter, "YYYY-MM-DDTHH:MM:SS"))
items = []
while url is not null:
page = request(url) // one request at a time — never parallelize per key
items.append_all(page.data) // each item: { id, title }
url = page.links.next // null on the last page
return items
function fetchAllH5PContentDetails():
details = []
for item in fetchAllH5PContent():
details.append(request(BASE_URL + "/h5ps/" + item.id + "?expanded=true"))
return details
Notes:
- The key needs h5ps.list (and h5ps.get for details).
- For incremental syncs, store the time of the last successful run (UTC) and pass it as updated-after.
- List results have no guaranteed ordering; content created or changed while paging may shift between pages. Use updated-after on the next run to catch such changes.