Certificate

Una plantilla elegante para certificados de cursos, logros y premios.

Dimensiones: 1200x630
Template ID: certificate

Propiedades

PropiedadTipoRequeridoLong. MáximaValidación
recipientName
Nombre del destinatario
string50maxLength(50)
courseName
Nombre del curso/logro
string60maxLength(60)
description
Descripción
string100maxLength(100)
completionDate
Fecha de finalización
string30maxLength(30)
instructorName
Nombre del instructor/firmante
string40maxLength(40)
imageUrl
URL del sello/logo
string (URL)-url (HTTPS only)
primaryColor
Color principal
string (hex)-color (hex)
accentColor
Color de acento
string (hex)-color (hex)

Ejemplo

{
  "template": "certificate",
  "recipientName": "John Smith",
  "courseName": "Advanced Web Development",
  "description": "For successfully completing the course with distinction",
  "completionDate": "March 7, 2026",
  "instructorName": "Dr. Jane Anderson",
  "imageUrl": "https://example.com/seal.png",
  "primaryColor": "#1e3a8a",
  "accentColor": "#d4af37"
}

Ejemplos de código

const response = await fetch("https://assets.qbacode.com/api/v1/generate-asset", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
        "template": "certificate",
        "recipientName": "John Smith",
        "courseName": "Advanced Web Development",
        "description": "For successfully completing the course with distinction",
        "completionDate": "March 7, 2026",
        "instructorName": "Dr. Jane Anderson",
        "imageUrl": "https://example.com/seal.png",
        "primaryColor": "#1e3a8a",
        "accentColor": "#d4af37"
    })
});

if (response.ok) {
  const blob = await response.blob();
  const imageUrl = URL.createObjectURL(blob);
  document.getElementById("preview").src = imageUrl;
} else {
  const error = await response.json();
  console.error("Error:", error);
}