Appearance
Return
Generate a certificate PDF with APITemplate.io
Create an API that generates a certificate PDF from a template using a name and course.
TEMPLATE AVAILABLE
If you wish to skip the manual setup, there is a workflow template available called Generate Certificate PDF (APITemplate.io). You can find it inside the templates available when creating an API workflow.
Steps at a glance ​
- Create a certificate template in APITemplate.io.
- Connect APITemplate.io in the
Integrationstab. - Create an API that accepts
nameandcourse. - Use
Create PDFand return the generated PDF URL.
1) Create a certificate template in APITemplate.io ​
- In APITemplate.io, create a template for your certificate.
- Add two text fields (or placeholders) you will populate from WeWeb:
- A field for the recipient’s name.
- A field for the course name.
- Open the
JSONtab and copy the example JSON (this shows the exact field names your template expects). - Copy the template ID.
2) Connect the integration in WeWeb ​
- In the editor, open the
Integrationstab. - Open
APITemplate.ioand connect it. - Store the API key in an environment variable.
3) Create an API that generates the certificate PDF ​
- Open
Data & API → APIs. - Create an endpoint like
POST /certificate. - Add two inputs to the API (these are the values your interface will send):
namecourse
- Add the
APITemplate.io → Create PDFaction and set:Template IDTo your certificate template ID.Template DataUsing the JSON you copied from APITemplate’sJSONtab, then replace the example values with your API inputs.- If your template uses a key like
course_name, you can still keep your API input ascourseand map it tocourse_nameinTemplate Data.
- If your template uses a key like
- Send a response that returns the generated PDF URL (for example
download_url).
4) Call the API from your interface ​
- Create a form (or inputs) for
NameandCourse. - On submit, call your
POST /certificateAPI and pass the two values. - Display the returned PDF link, or open it in a new tab.
Common pitfalls ​
The PDF is generated but the name or course is empty ​
- Confirm the field names you send match the fields expected by your APITemplate template.
- Start by sending only
name, confirm it works, then addcourse.

