Open in gallery

Certificate of Completion template

The certificate-of-completion template renders a business image as a PNG. POST a JSON payload to the endpoint below and you receive a CDN URL in the response.

Endpoint

POST https://app.html2img.com/api/v1/templates/certificate-of-completion
X-API-Key: <your-api-key>
Content-Type: application/json

Authentication uses the X-API-Key header. See the authentication docs for details on issuing and rotating keys.

Inputs

The full set of inputs the template accepts:

Name Type Required Description Example
recipient_name string Yes Text value for the recipient name. Margaret Lin
course_name string Yes Text value for the course name. Foundations of Production Engineering
completion_date string Yes Text value for the completion date. April 30, 2026
issuer_name string Yes Text value for the issuer name. Halberd Software Academy
issuer_title string No Text value for the issuer title. Director of Education
issuer_signature_url url No URL of the issuer signature to include in the rendered image. https://i.html2img.com/static/sample-signature.png
certificate_id string No Text value for the certificate id. HSA-2026-009421
issuer_logo_url url No URL of the issuer logo to include in the rendered image. -
seal_url url No URL of the seal to include in the rendered image. -
accent_color string No Hex colour code for the accent. #1F2937

Defaults

Defaults applied automatically when not overridden in the request:

Option Default value
width 2480
height 1754

Code examples

curl -X POST https://app.html2img.com/api/v1/templates/certificate-of-completion \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recipient_name":"Margaret Lin","course_name":"Foundations of Production Engineering","completion_date":"April 30, 2026","issuer_name":"Halberd Software Academy","issuer_title":"Director of Education","issuer_signature_url":"https://i.html2img.com/static/sample-signature.png","certificate_id":"HSA-2026-009421","accent_color":"#1F2937"}'

Looking for a fuller integration sketch in your language? The usage guides cover PHP, Laravel, Rails, Python, JavaScript, React and Vue.

Response

A successful render returns:

{
 "success": true,
 "id": "abc123",
 "url": "https://i.html2img.com/abc123.png",
 "credits_remaining": 1234,
 "template": "certificate-of-completion"
}

The url field is a CDN URL for the rendered PNG. credits_remaining tracks your monthly quota. Shared response fields are documented in the API parameters reference.

Errors

The template endpoint returns the following error responses:

422 Validation failed

Returned when one or more inputs fail validation. The errors object lists field-specific messages.

{
 "success": false,
 "error": "validation_failed",
 "errors": {
 "title": ["The title field is required."]
 }
}

404 Template not found

Returned with {"code": "template_not_found"} if the slug is not registered. Check the template list for current slugs.

401 Unauthorised

Missing or invalid API key. See the authentication docs.

429 Too many requests

You have hit the rate limit or used your monthly credits. The pricing page covers higher-volume plans.

Related templates

  • Invoice Image - Render full invoices as PNG images for emails, dashboards, and exports
  • Event Ticket - Print- and email-ready tickets with QR/barcode slot and perforated stub
  • Receipt Image - Compact order receipts for confirmation emails and thank-you screens
  • Product Card - E-commerce product cards with price, optional sale price, and CTA

See the Certificate of Completion template in our gallery for sample renders and use cases.