This article highlights key considerations, limits, and common use cases when working with Bridge’s open APIs. It’s intended for admins or technical users who are already familiar with API basics and want to work more efficiently with Bridge data.
Tip: If you’re new to API tokens, start with ‘How to Create an API Token in Bridge’ before continuing.
API Basics
Bridge provides open APIs for interacting with selected areas of the platform. All API tokens are subject to a rate limit of five API calls per second.
To learn how to make API requests in Postman, watch the linked instructional video series.
Pagination and Limits
Limit Query
The limit query parameter has a maximum value of 1000. This controls how many records are returned per page, not the total number of records available.
To retrieve additional records, use the next page link returned in the response.
Pagination is used to prevent large synchronous requests that could time out due to excessive data payloads.
Sorting Results
You can sort API responses using fields such as completed_at to return completed enrollments first.
Example:
sort=completed_at
Add this parameter directly to the request URL.
Using Runners for Bulk Jobs
When performing bulk updates, you’ll need to use a runner. Runners allow you to apply the same API action across many records using a CSV file.
For detailed guidance, see Part 9 of the API video series.
Example: Removing Expiration Dates in Bulk
If you want to remove expiration dates from completed enrollments, use the following endpoint:
PATCH /api/learn/author/enrollments/{{enrollment_id}}
Your CSV file only needs a single column that matches the placeholder used in the endpoint.
Example CSV file:
enrollment_id
1234
5678
Common Error Tip: If you encounter errors, first check that your CSV file is encoded in UTF-8. A simple fix is to upload the data into Google Sheets and re-export it as a CSV before retrying.
Common API Examples
Send Welcome Emails in Bulk
You can send welcome emails in bulk by including a full list of users.
- Users who are still eligible will return a 200 status.
- Users who have already progressed past the welcome email stage will return a 400 status, and no email will be sent.
Endpoint:
POST /api/author/notifications/:id/password
Create a Sub-Account
Sub-accounts can be created programmatically using the API.
Endpoint:
POST /api/admin/sub_accounts
Bulk Upload SCORM Content
You can bulk import SCORM zip files using the following process:
- Upload the SCORM zip file to S3: https://docs.bridgeapp.com/doc/api/html/file.file_upload.html
Retrieve the S3 URL from the response. - Create a blank course template: https://docs.bridgeapp.com/doc/api/html/author_course_templates.html#create-endpoint
Payload:
{"course_templates":[{}]} - Upload the SCORM file to the course: https://docs.bridgeapp.com/doc/api/html/author_course_templates.html#upload-endpoint
Use the S3 URL as the location. - Update the course title or attributes (Optional): https://docs.bridgeapp.com/doc/api/html/author_course_templates.html#update-endpoint
- Publish the course (Optional): https://docs.bridgeapp.com/doc/api/html/author_course_templates.html#publish-endpoint
Uploading Historical Learner Records
You can add historical training records for learners using the API. The action depends on whether the learner is already enrolled in the course.
If the Learner Is Already Enrolled
Update the existing enrollment:
PUT /api/author/enrollments/{{enrollment_id}}
Documentation:
https://docs.bridgeapp.com/doc/api/html/author_enrollments.html#update-endpoint
If the Learner Is Not Enrolled
Create a new enrollment with historical data:
POST /api/author/course_templates/{{course_id}}/enrollments
Documentation:
https://docs.bridgeapp.com/doc/api/html/author_enrollments.html#create-endpoint
Important Notes
- user_id must be the Bridge user ID (numeric). This can be found in:
- users.csv from a data dump, or
- The Export all users option in Users & Groups
- users.csv from a data dump, or
Dates must follow this format, including milliseconds and timezone:
YYYY-MM-DDTHH:MM:SS.MSS-0600
For example:
2025-04-15T12:00:00.000-0600
- Scores are optional unless required by your reporting needs
Related to
Comments
0 comments
Article is closed for comments.