🚀 Quick Start Guide – Akowe Template SDK

Sign up Log in


The Akowe Template SDK lets you build and edit certificate templates with a drag-and-drop editor inside your own app.


1. Include the SDK

Add the SDK script to your page:

<script src="https://issuance.akowe.app/sdk"></script>

2. Initialize the SDK

<script>
  const certApp = new CertificateSDK({
    onCreateCompleted: (data) => {
      console.log("Template created:", data);
      // send to Template Create API
    },
    onEditCompleted: (data) => {
      console.log("Template edited:", data);
      // send to Template Edit API
    },
    onError: (err) => {
      console.error("SDK Error:", err);
    },
    onClose: () => {
      console.log("User closed the modal");
    },
  });
</script>

3. Create a Template

<button onclick="certApp.createTemplate()">Create Template</button>

👉 Opens the drag-and-drop editor. 👉 Returns template JSON via onCreateCompleted.


4. Edit a Template

<script>
  const existingTemplate = {
    id: "demo-id-123",
    name: "Demo Template",
    imageUrl: "https://cdn.example.com/demo-bg.jpg",
    fields: [
      { type: "name", text: "Full Name", x: 50, y: 40, fontSize: 16 },
      { type: "date", text: "Issue Date", x: 50, y: 60, fontSize: 16 }
    ],
    dimensions: { width: 1920, height: 1080 }
  };
</script>

<button onclick="certApp.editTemplate(existingTemplate)">Edit Template</button>

👉 Loads an existing template. 👉 Returns updated JSON via onEditCompleted.


5. Close the Modal

<button onclick="certApp.close()">Close Editor</button>

6. Send Data to API

Once you get the template JSON from the SDK, send it to the API:

# Create Template
curl --location 'https://issuance.akowe.app/api/template' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "name": "My Template",
  "imageUrl": "https://cdn.example.com/bg.jpg",
  "fields": [ ... ]
}'

✅ That’s it! In just a few lines, you can create, edit, and manage templates inside your own app.


Get Your API Key API reference

Last updated