Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

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 ​

  1. Create a certificate template in APITemplate.io.
  2. Connect APITemplate.io in the Integrations tab.
  3. Create an API that accepts name and course.
  4. Use Create PDF and return the generated PDF URL.

1) Create a certificate template in APITemplate.io ​

  1. In APITemplate.io, create a template for your certificate.
  2. Add two text fields (or placeholders) you will populate from WeWeb:
    • A field for the recipient’s name.
    • A field for the course name.
  3. Open the JSON tab and copy the example JSON (this shows the exact field names your template expects).
  4. Copy the template ID.

2) Connect the integration in WeWeb ​

  1. In the editor, open the Integrations tab.
  2. Open APITemplate.io and connect it.
  3. Store the API key in an environment variable.

3) Create an API that generates the certificate PDF ​

  1. Open Data & API → APIs.
  2. Create an endpoint like POST /certificate.
  3. Add two inputs to the API (these are the values your interface will send):
    • name
    • course
  4. Add the APITemplate.io → Create PDF action and set:
    • Template ID To your certificate template ID.
    • Template Data Using the JSON you copied from APITemplate’s JSON tab, 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 as course and map it to course_name in Template Data.
  5. Send a response that returns the generated PDF URL (for example download_url).

4) Call the API from your interface ​

  1. Create a form (or inputs) for Name and Course.
  2. On submit, call your POST /certificate API and pass the two values.
  3. 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 add course.