List Certificates
Retrieves all certificates for the authenticated user or a specific user (admin only).Query Parameters
string
Admin only: User UUID to retrieve certificates for
Response
array
Array of certificate objects
Example Request
Example Response
Issue Certificate
Issues a new certificate for a completed course. Requires course completion and certificate enablement.Request Body
number
required
Course ID to issue certificate for
Response
object
string
Success or informational message
Example Request
Example Response
Validation
Before issuing a certificate, the API validates:- ✓ User has completed the course (status = “completed”)
- ✓ Certificates are enabled for the course (
certificate_enabled = true) - ✓ Certificate doesn’t already exist for this user-course combination
Download Certificate
Generates and downloads a PDF certificate. The PDF is generated on-demand and uploaded to S3 for future access.Path Parameters
string
required
Certificate UUID
Response
Returns a PDF file with:- Content-Type:
application/pdf - Content-Disposition:
attachment; filename="certificate-{number}.pdf"
Example Request
Certificate Generation
The API:- Validates user access (owner or admin)
- Checks if PDF already exists in S3
- If not, generates PDF with:
- Platform logo and name (from brand settings)
- Learner name
- Course title
- Certificate number
- Issue date
- Certificate type (completion/participation/achievement)
- Digital signature (if configured)
- Uploads PDF to S3
- Saves PDF URL to database (
certificate_url) - Returns PDF file
Certificate Types
Three certificate types are supported:Certificate Configuration
Certificates are configured at the course level with these fields:Brand Integration
Certificates automatically include:- Platform Logo: Fetched from brand settings (
logoBlackfor white background) - Organization Name: From brand settings (
platformName) - Fallback: Uses default logo and “EaseLMS” if brand settings unavailable
Certificate Notifications
When a certificate is issued, the API automatically:- Sends email notification to the user
- Includes download link in the email
- Email contains certificate number and course details
Certificate Number Format
Certificate numbers are generated as:CERT-1705320600000-A1B2C3D4E
This ensures:
- Uniqueness (timestamp + random)
- Sortability (timestamp-based)
- Easy identification (CERT prefix)
PDF Storage
Generated PDFs are:- Stored in S3 with path:
certificates/{userId}/certificate-{number}.pdf - URL saved to
certificate_urlfield - Reused for future downloads (regenerated only if missing)
- Accessible via direct S3 URL or download endpoint