# Developer Platform

Welcome to your team’s developer platform

<h2 align="center">🚀 Quick Start Guide – Akowe Template SDK</h2>

<p align="center"><a href="https://issuance.akowe.app/auth/create-account" class="button primary">Sign up</a> <a href="https://issuance.akowe.app/auth/login" class="button secondary">Log in</a></p>

***

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:

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

***

### 2. Initialize the SDK

```html
<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

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

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

***

### 4. Edit a Template

```html
<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

```html
<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:

```bash
# 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.

***

<a href="https://issuance.akowe.app/auth/create-account" class="button primary" data-icon="rocket-launch">Get Your API Key</a> <a href="https://documentation.akowe.app/api-reference" class="button secondary" data-icon="terminal">API reference</a>


# SDK Documentation

***

The **Akowe Template SDK** allows you to **design and edit certificate templates** directly in your application using a drag-and-drop editor.\
Once a template is created or edited, you can easily pass the resulting data to the **Template Create** or **Template Edit** API endpoints.

***

### 1. Installation

Include the SDK script in your HTML file:

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

***

### 2. Initialize the SDK

Create a new instance of `CertificateSDK` with lifecycle callbacks for handling events.

```html
<script>
  const certApp = new CertificateSDK({
    onLoad: (res) => {
      console.log("SDK Loaded:", res);
    },
    onCreateCompleted: (data) => {
      console.log("New template created:", data);
      // Send this `data` to your Template Create API
    },
    onEditCompleted: (data) => {
      console.log("Template edited:", data);
      // Send this `data` to your Template Edit API
    },
    onClose: () => {
      console.log("Modal closed");
      // Call this when after a successful request to template Create or Edit endpoint
    },
    onError: (err) => {
      console.error("SDK error:", err);
    }
  });
</script>
```

***

### 3. Create a New Template

To allow a user to design a **new certificate template**, call the `createTemplate()` method.\
This will open the drag-and-drop editor in a modal.

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

✅ When the user saves the design, the `onCreateCompleted` callback returns the final template JSON.

Example output:

```json
{
  "name": "My New Template",
  "imageUrl": "https://domain.com/template-background.jpg",
  "fields": [
    {
      "type": "name",
      "text": "Full Name",
      "x": 50,
      "y": 40,
      "fontSize": 16,
      "fontFamily": "Arial",
      "color": "#000000",
      "alignment": "center"
    }
  ],
  "dimensions": { "width": 1920, "height": 1080 }
}
```

You can then send this JSON to the **Template Create API endpoint**.

***

### 4. Edit an Existing Template

To load and edit a previously saved template, call `editTemplate(templateObject)` with the template JSON you want to edit. You can get templates by utilizing the Get Template endpoint

```html
<button onclick="certApp.editTemplate(demoTemplate)">Edit Template</button>
```

Example `demoTemplate`:

```js
const demoTemplate = {
  id: "99be58b7-57a4-4cc7-8b64-37f3d72784c0",
  name: "Demo",
  imageUrl: "https://cdn.example.com/templates/demo-bg.jpg",
  fields: [
    { type: "name", text: "Display Name", x: 50, y: 40, fontSize: 16 },
    { type: "date", text: "Issue Date", x: 50, y: 50, fontSize: 16 },
    { type: "qr", text: "QR Code", x: 50, y: 70, fontSize: 50 }
  ],
  dimensions: { width: 2560, height: 1920 }
};
```

✅ When editing is complete, the `onEditCompleted` callback provides the updated template JSON.\
You can then send this to the **Template Edit API endpoint**.

***

### 5. Closing the Modal

You can programmatically close the editor modal with:

```html
<button onclick="certApp.close()">Close Modal</button>
```

The `onClose` callback will be triggered when the modal is closed.

***

### 6. Typical Workflow

1. User clicks **Create Template** → designs template → result JSON returned via `onCreateCompleted`.
2. You send the result JSON to your backend via the **Template Create API**.
3. Later, user clicks **Edit Template** → loads existing template JSON → edits and saves → updated JSON returned via `onEditCompleted`.
4. You send the updated JSON to the **Template Edit API**.

***

### 7. Error Handling

The SDK may throw errors (e.g., missing container, invalid template object). Always handle them with the `onError` callback:

```js
onError: (err) => {
  console.error("Error in SDK:", err.message);
}
```

***

### 8. Full Example

```html
<html>
  <head>
    <script src="http://localhost:4003/sdk"></script>
  </head>
  <body>
    <script>
      const demoTemplate = {
        id: "99be58b7-57a4-4cc7-8b64-37f3d72784c0",
        name: "Demo",
        imageUrl: "https://cdn.example.com/templates/demo-bg.jpg",
        fields: [
          { type: "name", text: "Display Name", x: 50, y: 40, fontSize: 16 },
          { type: "date", text: "Issue Date", x: 50, y: 50, fontSize: 16 },
          { type: "qr", text: "QR", x: 50, y: 70, fontSize: 50 }
        ],
        dimensions: { width: 2560, height: 1920 }
      };

      const certApp = new CertificateSDK({
        onCreateCompleted: (data) => {
          console.log("Send this to Template Create API:", data);
        },
        onEditCompleted: (data) => {
          console.log("Send this to Template Edit API:", data);
        },
        onError: (err) => {
          console.error("SDK error:", err);
        },
        onClose: () => {
          console.log("Modal closed");
          // Call this when after a successful request to template Create or Edit endpoint
        },
      });
    </script>

    <button onclick="certApp.createTemplate()">Create Template</button>
    <button onclick="certApp.editTemplate(demoTemplate)">Edit Template</button>
    <button onclick="certApp.close()">Close Modal</button>
  </body>
</html>
```

***


# API Reference

🚀 Quick Start The Akowe Issuance API & SDK allows you to design, issue, and manage certificates with minimal setup.

***

### ✅ Prerequisites

Before you start, make sure you have:

* An **Akowe Issuance account.**
* Your **API key** (available in the Akowe issuance profile section).
* Basic knowledge of **JavaScript** (for SDK) or **HTTP requests** (for REST API).

***

### 🧩 How the API is Structured

* **Interactive Widget (SDK)** – Embed the certificate editor in your web app for drag-and-drop template design.
* **REST API Endpoints** – Programmatically manage organizations, templates, balances, and certificate issuance.
* **Event Callbacks** – Get real-time events like `onLoad`, `onSuccess`, `onClose`, and `onError`.

***

### 🔑 Authentication & Credentials

Every request requires authentication headers:

* **x-api-key** *(required)* – Your unique API key.
* **x-subaccount-email** *(optional)* – Identifies a specific sub-account. Useful for scoping templates or certificates to a user.

👉 Always include these credentials making API requests.

***

### ⚡ Example: Initializing the SDK

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

<script>
  const certApp = new CertificateSDK({
    onLoad: (res) => {
      console.log("SDK Loaded:", res);
    },
    onCreateCompleted: (data) => {
      console.log("New template created:", data);
      // Send this `data` to your Template Create API
    },
    onEditCompleted: (data) => {
      console.log("Template edited:", data);
      // Send this `data` to your Template Edit API
    },
    onClose: () => {
      console.log("Modal closed");
      // Call this when after a successful request to template Create or Edit endpoint
    },
    onError: (err) => {
      console.error("SDK error:", err);
    }
  });
</script>
```

***

### 🚀 Getting Started Steps

1. **Obtain API credentials** from your Akowe issuance dashboard.
2. **Embed the SDK** in your frontend or call API endpoints directly.
3. **Test integration** in development before moving to production.

With clear endpoints, event callbacks, and a ready-to-use SDK, you can integrate **Akowe Issuance in minutes—not hours**.

<br>


# Why This Documentation?

This guide demonstrates best practices for using the Akowe Issuance API. It includes:

* Interactive examples you can try directly in your environment.
* Step-by-step guidance for authentication and making API calls.
* Structured endpoint documentation for all available features.


# Base URL

All API requests should be made to the following **base URL**:

```
https://issuance.akowe.app/api

```


# Authentication

Every request to the **Akowe Issuance API** must include authentication headers:

* **`x-api-key`** *(required)* – Your unique API key from the Akowe dashboard.
* **`x-subaccount-email`** *(optional)* – Used to scope requests to a specific user’s assets (e.g., templates created by that sub-account).

**Example request headers**

```
curl -X POST "https://api.akowe.app/v1/your-endpoint" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-subaccount-email: user1@email.com" \
  -d '{
        "key1": "value1",
        "key2": "value2"
      }'

```

Without these headers, requests will be rejected with an **unauthorized** response.


# Obtaining an API Key

**Create an Akowe account**\
Sign up at [Akowe Issuance ](https://issuance.akowe.app)to get your api key


# Error Handling

All Akowe Issuance API endpoints follow a standard error response format. You should always handle these errors gracefully in your integration.

#### Error Response Format

```json
{
  "success": false,
  "message": "Error description here"
}

```

#### Common Error Codes

| Status Code | Error Type            | Description                                                              |
| ----------- | --------------------- | ------------------------------------------------------------------------ |
| **400**     | Bad Request           | The request is invalid or missing required parameters.                   |
| **401**     | Unauthorized          | The API key provided is missing, invalid, or expired.                    |
| **403**     | Forbidden             | You do not have permission to access this resource.                      |
| **404**     | Resource Not Found    | The requested resource (e.g., organization, certificate) does not exist. |
| **429**     | Too Many Requests     | You have exceeded the allowed rate limit. Retry after some time.         |
| **500**     | Internal Server Error | A problem occurred on Akowe’s servers. Try again later.                  |

#### Sample Error Responses

**401 Unauthorized**

```json
{
  "success": false,
  "message": "Invalid or missing API key"
}

```

**404 Resource Not Found**

```json
{
  "success": false,
  "message": "The requested organization could not be found"
}

```

**500 Internal Server Error**

```json
{
  "success": false,
  "message": "An unexpected error occurred. Please try again later."
}

```

***


# Certificate Issuance

The **Certificate Issuance API** allows you to issue a new digital certificate to a recipient.

This endpoint creates the certificate, associates it with an organization, and optionally sends an email notification to the recipient.

#### Endpoint

`POST /api/certificates/issue`

#### Description

Use this endpoint to issue a new certificate to a recipient.

You must provide the recipient’s details (name, email, and optional attributes), the organization ID under which the certificate is being issued, and optional email content if you want the certificate delivered via email.

#### Headers

* **`x-api-key`** *(required)* – Your API key from the Akowe dashboard.
* **`x-subaccount-email`** *(optional)* – Used to scope issuance to a particular user’s assets.
* **`Content-Type`**: `application/json`

#### Request Body

| Field            | Type   | Required | Description                                                                                                                                                                                                                                                                                              |
| ---------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipientData`  | object | ✅ Yes    | <p>Information about the recipient. Includes <code>name</code>, <code>email</code>, and optional certificate <code>attributes</code>.<br><br>For attributes to work, you need need to create and position fields on your template with the same name as you have specified in the attributes object.</p> |
| `organizationId` | string | ✅ Yes    | The unique ID of the organization issuing the certificate.                                                                                                                                                                                                                                               |
| `mailData`       | object | ✅ Yes    | Email configuration for sending the certificate. Includes `templateId`, `subject`, and `body`.                                                                                                                                                                                                           |

**Example Request**

```bash
curl --location '{{baseurl}}/api/certificates/issue' \
--header &#x27;x-api-key: <your_api_key>&#x27; \
--header 'x-subaccount-email: vendor@example.com' \
--header 'Content-Type: application/json' \
--data-raw '{
  "recipientData": {
    "name": "John Doe",
    "email": "johndoe@mail.com",
    "attributes": {
      "Course Name": "Machine Learning",
      "Grade": "Excellent"
    }
  },
  "organizationId": "ae08808f-85e5-4444-92ca-304a07531f3b",
  "mailData": {
    "templateId": "777e143a-f685-48da-bc8d-39105b8336c0",
    "subject": "Hello",
    "body": "This is a demo credential, congratulations"
  }
}'

```

#### Example Successful Response

```json
{
  "success": true,
  "message": "Certificate issued successfully",
  "data": {
    "certificateId": "c2d9d40d-6f5e-4f3b-8c4b-8d7d2f35f122",
    "recipient": {
      "name": "John Doe",
      "email": "johndoe@mail.com",
    },
    "organizationId": "ae08808f-85e5-4444-92ca-304a07531f3b",
    "issuedAt": "2025-09-24T16:45:10.000Z"
  }
}

```

## POST /certificates/issue

> Issue Single Credential

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Certificate Issuance","description":"The **Certificate Issuance API** allows you to issue a new digital certificate to a recipient.\n\nThis endpoint creates the certificate, associates it with an organization, and optionally sends an email notification to the recipient.\n\n### Endpoint\n\n`POST /api/certificates/issue`\n\n### Description\n\nUse this endpoint to issue a new certificate to a recipient.\n\nYou must provide the recipient’s details (name, email, and optional attributes), the organization ID under which the certificate is being issued, and optional email content if you want the certificate delivered via email.\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Used to scope issuance to a particular user’s assets.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `recipientData` | object | ✅ Yes | Information about the recipient. Includes `name`, `email`, and optional certificate `attributes`.  <br>  <br>For attributes to work, you need need to create and position fields on your template with the same name as you have specified in the attributes object. |\n| `organizationId` | string | ✅ Yes | The unique ID of the organization issuing the certificate. |\n| `mailData` | object | ✅ Yes | Email configuration for sending the certificate. Includes `templateId`, `subject`, and `body`. |\n\n#### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/certificates/issue' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: vendor@example.com' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"recipientData\": {\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@mail.com\",\n    \"attributes\": {\n      \"Course Name\": \"Machine Learning\",\n      \"Grade\": \"Excellent\"\n    }\n  },\n  \"organizationId\": \"ae08808f-85e5-4444-92ca-304a07531f3b\",\n  \"mailData\": {\n    \"templateId\": \"777e143a-f685-48da-bc8d-39105b8336c0\",\n    \"subject\": \"Hello\",\n    \"body\": \"This is a demo credential, congratulations\"\n  }\n}'\n\n ```\n\n### Example Successful Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Certificate issued successfully\",\n  \"data\": {\n    \"certificateId\": \"c2d9d40d-6f5e-4f3b-8c4b-8d7d2f35f122\",\n    \"recipient\": {\n      \"name\": \"John Doe\",\n      \"email\": \"johndoe@mail.com\",\n    },\n    \"organizationId\": \"ae08808f-85e5-4444-92ca-304a07531f3b\",\n    \"issuedAt\": \"2025-09-24T16:45:10.000Z\"\n  }\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/certificates/issue":{"post":{"tags":["Certificate Issuance"],"summary":"Issue Single Credential","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````


# Templates

The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.

This section covers all template-related endpoints:

***

### 1. Get All Templates

#### Endpoint

`GET /api/templates`

#### Description

Fetches all templates available to your account (or sub-account if provided).

#### Headers

* **`x-api-key`** *(required)* – Your API key from the Akowe dashboard.
* **`x-subaccount-email`** *(optional)* – Filters results to templates created by the specified sub-account.

#### Example Request

```bash
curl --location '{{baseurl}}/api/templates' \
--header &#x27;x-api-key: <your_api_key>&#x27;

```

#### Example Response

```json
{
  "success": true,
  "message": "",
  "data": [
    {
      "id": "290e4c3b-1da4-4f7e-811d-30dde4f8858d",
      "name": "Demo Template",
      "imageUrl": "https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg",
      "fields": [
        {
          "id": "997a7a31-a5eb-4b6a-bb01-f2b60c848171",
          "type": "name",
          "text": "Display Name",
          "fontSize": 16,
          "fontFamily": "Arial",
          "color": "#000000",
          "isBold": false,
          "isItalic": false,
          "alignment": "center",
          "x": 50,
          "y": 40
        }
      ],
      "dimensions": {
        "width": 2560,
        "height": 1920
      },
      "subAccountEmail": "johndoe@email.com",
      "createdAt": "2025-09-24T18:23:43.621Z"
    }
  ]
}

```

***

### 2. Create Template

#### Endpoint

`POST /api/templates`

#### Description

Creates a new certificate template with a background image, dimensions, and defined fields.

#### Headers

* **`x-api-key`** *(required)*
* **`x-subaccount-email`** *(optional but recommended)* – Links the template to a specific sub-account.
* **`Content-Type`**: `application/json`

#### Request Body

| Field        | Type   | Required | Description                                       |
| ------------ | ------ | -------- | ------------------------------------------------- |
| `name`       | string | ✅ Yes    | The template name.                                |
| `imageUrl`   | string | ✅ Yes    | Base64 string or image URL for the background.    |
| `dimensions` | object | ✅ Yes    | Width and height of the template.                 |
| `fields`     | array  | ✅ Yes    | List of field definitions (e.g., name, date, QR). |

#### Example Request

```bash
curl --location '{{baseurl}}/api/templates' \
--header &#x27;x-api-key: <your_api_key>&#x27; \
--header 'x-subaccount-email: johndoe@email.com' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Demo",
  "imageUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z",
  "dimensions": {
    "width": 2560,
    "height": 1920
  },
  "fields": [
    {
      "type": "name",
      "text": "Display Name",
      "x": 50,
      "y": 40,
      "fontSize": 16,
      "fontFamily": "Arial",
      "color": "#000000",
      "isBold": false,
      "isItalic": false,
      "alignment": "center"
    }
  ]
}'

```

#### Example Response

```json
{
  "success": true,
  "message": "Template created successfully",
  "data": {
    "id": "290e4c3b-1da4-4f7e-811d-30dde4f8858d",
    "name": "Demo",
    "imageUrl": "https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg",
    "dimensions": {
      "width": 2560,
      "height": 1920
    },
    "fields": [
      {
        "id": "8fa5eacf-34e3-4115-82c8-356edc9ccd6f",
        "type": "name",
        "text": "Display Name",
        "x": 50,
        "y": 40
      }
    ]
  }
}

```

***

### 3. Edit Template

#### Endpoint

`PUT /api/templates/{templateId}`

#### Description

Updates an existing template’s details and fields.

#### Headers

* **`x-api-key`** *(required)*
* **`Content-Type`**: `application/json`

#### Example Request

```bash
curl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \
--header &#x27;x-api-key: <your_api_key>&#x27; \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Demo Edited",
  "imageUrl": "https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg",
  "fields": [...]
}'

```

#### Example Response

```json
{
  "success": true,
  "message": "Template updated successfully"
}

```

***

### 4. Get Template by ID

#### Endpoint

`GET /api/templates/{templateId}`

#### Description

Fetches the details of a specific template.

#### Headers

* **`x-api-key`** *(required)*

#### Example Response

```json
{
  "success": true,
  "data": {
    "id": "290e4c3b-1da4-4f7e-811d-30dde4f8858d",
    "name": "Demo Edited",
    "imageUrl": "https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg",
    "fields": [...],
    "dimensions": {
      "width": 2560,
      "height": 1920
    }
  }
}

```

***

### 5. Delete Template

#### Endpoint

`DELETE /api/templates/{templateId}`

#### Description

Deletes a specific template permanently.

#### Headers

* **`x-api-key`** *(required)*

#### Example Response

```json
{
  "success": true,
  "message": "Template deleted successfully"
}

```

## GET /templates

> Get Templates

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.\n\nThis section covers all template-related endpoints:\n\n---\n\n## 1\\. Get All Templates\n\n### Endpoint\n\n`GET /api/templates`\n\n### Description\n\nFetches all templates available to your account (or sub-account if provided).\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Filters results to templates created by the specified sub-account.\n    \n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27;\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n      \"name\": \"Demo Template\",\n      \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n      \"fields\": [\n        {\n          \"id\": \"997a7a31-a5eb-4b6a-bb01-f2b60c848171\",\n          \"type\": \"name\",\n          \"text\": \"Display Name\",\n          \"fontSize\": 16,\n          \"fontFamily\": \"Arial\",\n          \"color\": \"#000000\",\n          \"isBold\": false,\n          \"isItalic\": false,\n          \"alignment\": \"center\",\n          \"x\": 50,\n          \"y\": 40\n        }\n      ],\n      \"dimensions\": {\n        \"width\": 2560,\n        \"height\": 1920\n      },\n      \"subAccountEmail\": \"johndoe@email.com\",\n      \"createdAt\": \"2025-09-24T18:23:43.621Z\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## 2\\. Create Template\n\n### Endpoint\n\n`POST /api/templates`\n\n### Description\n\nCreates a new certificate template with a background image, dimensions, and defined fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`x-subaccount-email`** _(optional but recommended)_ – Links the template to a specific sub-account.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `name` | string | ✅ Yes | The template name. |\n| `imageUrl` | string | ✅ Yes | Base64 string or image URL for the background. |\n| `dimensions` | object | ✅ Yes | Width and height of the template. |\n| `fields` | array | ✅ Yes | List of field definitions (e.g., name, date, QR). |\n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: johndoe@email.com' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Demo\",\n  \"imageUrl\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z\",\n  \"dimensions\": {\n    \"width\": 2560,\n    \"height\": 1920\n  },\n  \"fields\": [\n    {\n      \"type\": \"name\",\n      \"text\": \"Display Name\",\n      \"x\": 50,\n      \"y\": 40,\n      \"fontSize\": 16,\n      \"fontFamily\": \"Arial\",\n      \"color\": \"#000000\",\n      \"isBold\": false,\n      \"isItalic\": false,\n      \"alignment\": \"center\"\n    }\n  ]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template created successfully\",\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    },\n    \"fields\": [\n      {\n        \"id\": \"8fa5eacf-34e3-4115-82c8-356edc9ccd6f\",\n        \"type\": \"name\",\n        \"text\": \"Display Name\",\n        \"x\": 50,\n        \"y\": 40\n      }\n    ]\n  }\n}\n\n ```\n\n---\n\n## 3\\. Edit Template\n\n### Endpoint\n\n`PUT /api/templates/{templateId}`\n\n### Description\n\nUpdates an existing template’s details and fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Example Request\n\n``` bash\ncurl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Demo Edited\",\n  \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n  \"fields\": [...]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template updated successfully\"\n}\n\n ```\n\n---\n\n## 4\\. Get Template by ID\n\n### Endpoint\n\n`GET /api/templates/{templateId}`\n\n### Description\n\nFetches the details of a specific template.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo Edited\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"fields\": [...],\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    }\n  }\n}\n\n ```\n\n---\n\n## 5\\. Delete Template\n\n### Endpoint\n\n`DELETE /api/templates/{templateId}`\n\n### Description\n\nDeletes a specific template permanently.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/templates":{"get":{"tags":["Templates"],"summary":"Get Templates","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## POST /templates

> Create Template

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.\n\nThis section covers all template-related endpoints:\n\n---\n\n## 1\\. Get All Templates\n\n### Endpoint\n\n`GET /api/templates`\n\n### Description\n\nFetches all templates available to your account (or sub-account if provided).\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Filters results to templates created by the specified sub-account.\n    \n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27;\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n      \"name\": \"Demo Template\",\n      \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n      \"fields\": [\n        {\n          \"id\": \"997a7a31-a5eb-4b6a-bb01-f2b60c848171\",\n          \"type\": \"name\",\n          \"text\": \"Display Name\",\n          \"fontSize\": 16,\n          \"fontFamily\": \"Arial\",\n          \"color\": \"#000000\",\n          \"isBold\": false,\n          \"isItalic\": false,\n          \"alignment\": \"center\",\n          \"x\": 50,\n          \"y\": 40\n        }\n      ],\n      \"dimensions\": {\n        \"width\": 2560,\n        \"height\": 1920\n      },\n      \"subAccountEmail\": \"johndoe@email.com\",\n      \"createdAt\": \"2025-09-24T18:23:43.621Z\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## 2\\. Create Template\n\n### Endpoint\n\n`POST /api/templates`\n\n### Description\n\nCreates a new certificate template with a background image, dimensions, and defined fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`x-subaccount-email`** _(optional but recommended)_ – Links the template to a specific sub-account.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `name` | string | ✅ Yes | The template name. |\n| `imageUrl` | string | ✅ Yes | Base64 string or image URL for the background. |\n| `dimensions` | object | ✅ Yes | Width and height of the template. |\n| `fields` | array | ✅ Yes | List of field definitions (e.g., name, date, QR). |\n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: johndoe@email.com' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Demo\",\n  \"imageUrl\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z\",\n  \"dimensions\": {\n    \"width\": 2560,\n    \"height\": 1920\n  },\n  \"fields\": [\n    {\n      \"type\": \"name\",\n      \"text\": \"Display Name\",\n      \"x\": 50,\n      \"y\": 40,\n      \"fontSize\": 16,\n      \"fontFamily\": \"Arial\",\n      \"color\": \"#000000\",\n      \"isBold\": false,\n      \"isItalic\": false,\n      \"alignment\": \"center\"\n    }\n  ]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template created successfully\",\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    },\n    \"fields\": [\n      {\n        \"id\": \"8fa5eacf-34e3-4115-82c8-356edc9ccd6f\",\n        \"type\": \"name\",\n        \"text\": \"Display Name\",\n        \"x\": 50,\n        \"y\": 40\n      }\n    ]\n  }\n}\n\n ```\n\n---\n\n## 3\\. Edit Template\n\n### Endpoint\n\n`PUT /api/templates/{templateId}`\n\n### Description\n\nUpdates an existing template’s details and fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Example Request\n\n``` bash\ncurl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Demo Edited\",\n  \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n  \"fields\": [...]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template updated successfully\"\n}\n\n ```\n\n---\n\n## 4\\. Get Template by ID\n\n### Endpoint\n\n`GET /api/templates/{templateId}`\n\n### Description\n\nFetches the details of a specific template.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo Edited\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"fields\": [...],\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    }\n  }\n}\n\n ```\n\n---\n\n## 5\\. Delete Template\n\n### Endpoint\n\n`DELETE /api/templates/{templateId}`\n\n### Description\n\nDeletes a specific template permanently.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/templates":{"post":{"tags":["Templates"],"summary":"Create Template","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## GET /templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d

> Get Template

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.\n\nThis section covers all template-related endpoints:\n\n---\n\n## 1\\. Get All Templates\n\n### Endpoint\n\n`GET /api/templates`\n\n### Description\n\nFetches all templates available to your account (or sub-account if provided).\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Filters results to templates created by the specified sub-account.\n    \n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27;\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n      \"name\": \"Demo Template\",\n      \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n      \"fields\": [\n        {\n          \"id\": \"997a7a31-a5eb-4b6a-bb01-f2b60c848171\",\n          \"type\": \"name\",\n          \"text\": \"Display Name\",\n          \"fontSize\": 16,\n          \"fontFamily\": \"Arial\",\n          \"color\": \"#000000\",\n          \"isBold\": false,\n          \"isItalic\": false,\n          \"alignment\": \"center\",\n          \"x\": 50,\n          \"y\": 40\n        }\n      ],\n      \"dimensions\": {\n        \"width\": 2560,\n        \"height\": 1920\n      },\n      \"subAccountEmail\": \"johndoe@email.com\",\n      \"createdAt\": \"2025-09-24T18:23:43.621Z\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## 2\\. Create Template\n\n### Endpoint\n\n`POST /api/templates`\n\n### Description\n\nCreates a new certificate template with a background image, dimensions, and defined fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`x-subaccount-email`** _(optional but recommended)_ – Links the template to a specific sub-account.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `name` | string | ✅ Yes | The template name. |\n| `imageUrl` | string | ✅ Yes | Base64 string or image URL for the background. |\n| `dimensions` | object | ✅ Yes | Width and height of the template. |\n| `fields` | array | ✅ Yes | List of field definitions (e.g., name, date, QR). |\n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: johndoe@email.com' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Demo\",\n  \"imageUrl\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z\",\n  \"dimensions\": {\n    \"width\": 2560,\n    \"height\": 1920\n  },\n  \"fields\": [\n    {\n      \"type\": \"name\",\n      \"text\": \"Display Name\",\n      \"x\": 50,\n      \"y\": 40,\n      \"fontSize\": 16,\n      \"fontFamily\": \"Arial\",\n      \"color\": \"#000000\",\n      \"isBold\": false,\n      \"isItalic\": false,\n      \"alignment\": \"center\"\n    }\n  ]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template created successfully\",\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    },\n    \"fields\": [\n      {\n        \"id\": \"8fa5eacf-34e3-4115-82c8-356edc9ccd6f\",\n        \"type\": \"name\",\n        \"text\": \"Display Name\",\n        \"x\": 50,\n        \"y\": 40\n      }\n    ]\n  }\n}\n\n ```\n\n---\n\n## 3\\. Edit Template\n\n### Endpoint\n\n`PUT /api/templates/{templateId}`\n\n### Description\n\nUpdates an existing template’s details and fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Example Request\n\n``` bash\ncurl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Demo Edited\",\n  \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n  \"fields\": [...]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template updated successfully\"\n}\n\n ```\n\n---\n\n## 4\\. Get Template by ID\n\n### Endpoint\n\n`GET /api/templates/{templateId}`\n\n### Description\n\nFetches the details of a specific template.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo Edited\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"fields\": [...],\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    }\n  }\n}\n\n ```\n\n---\n\n## 5\\. Delete Template\n\n### Endpoint\n\n`DELETE /api/templates/{templateId}`\n\n### Description\n\nDeletes a specific template permanently.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d":{"get":{"tags":["Templates"],"summary":"Get Template","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## PUT /templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d

> Edit Template

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.\n\nThis section covers all template-related endpoints:\n\n---\n\n## 1\\. Get All Templates\n\n### Endpoint\n\n`GET /api/templates`\n\n### Description\n\nFetches all templates available to your account (or sub-account if provided).\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Filters results to templates created by the specified sub-account.\n    \n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27;\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n      \"name\": \"Demo Template\",\n      \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n      \"fields\": [\n        {\n          \"id\": \"997a7a31-a5eb-4b6a-bb01-f2b60c848171\",\n          \"type\": \"name\",\n          \"text\": \"Display Name\",\n          \"fontSize\": 16,\n          \"fontFamily\": \"Arial\",\n          \"color\": \"#000000\",\n          \"isBold\": false,\n          \"isItalic\": false,\n          \"alignment\": \"center\",\n          \"x\": 50,\n          \"y\": 40\n        }\n      ],\n      \"dimensions\": {\n        \"width\": 2560,\n        \"height\": 1920\n      },\n      \"subAccountEmail\": \"johndoe@email.com\",\n      \"createdAt\": \"2025-09-24T18:23:43.621Z\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## 2\\. Create Template\n\n### Endpoint\n\n`POST /api/templates`\n\n### Description\n\nCreates a new certificate template with a background image, dimensions, and defined fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`x-subaccount-email`** _(optional but recommended)_ – Links the template to a specific sub-account.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `name` | string | ✅ Yes | The template name. |\n| `imageUrl` | string | ✅ Yes | Base64 string or image URL for the background. |\n| `dimensions` | object | ✅ Yes | Width and height of the template. |\n| `fields` | array | ✅ Yes | List of field definitions (e.g., name, date, QR). |\n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: johndoe@email.com' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Demo\",\n  \"imageUrl\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z\",\n  \"dimensions\": {\n    \"width\": 2560,\n    \"height\": 1920\n  },\n  \"fields\": [\n    {\n      \"type\": \"name\",\n      \"text\": \"Display Name\",\n      \"x\": 50,\n      \"y\": 40,\n      \"fontSize\": 16,\n      \"fontFamily\": \"Arial\",\n      \"color\": \"#000000\",\n      \"isBold\": false,\n      \"isItalic\": false,\n      \"alignment\": \"center\"\n    }\n  ]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template created successfully\",\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    },\n    \"fields\": [\n      {\n        \"id\": \"8fa5eacf-34e3-4115-82c8-356edc9ccd6f\",\n        \"type\": \"name\",\n        \"text\": \"Display Name\",\n        \"x\": 50,\n        \"y\": 40\n      }\n    ]\n  }\n}\n\n ```\n\n---\n\n## 3\\. Edit Template\n\n### Endpoint\n\n`PUT /api/templates/{templateId}`\n\n### Description\n\nUpdates an existing template’s details and fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Example Request\n\n``` bash\ncurl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Demo Edited\",\n  \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n  \"fields\": [...]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template updated successfully\"\n}\n\n ```\n\n---\n\n## 4\\. Get Template by ID\n\n### Endpoint\n\n`GET /api/templates/{templateId}`\n\n### Description\n\nFetches the details of a specific template.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo Edited\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"fields\": [...],\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    }\n  }\n}\n\n ```\n\n---\n\n## 5\\. Delete Template\n\n### Endpoint\n\n`DELETE /api/templates/{templateId}`\n\n### Description\n\nDeletes a specific template permanently.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d":{"put":{"tags":["Templates"],"summary":"Edit Template","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## DELETE /templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d

> Delete Template

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Templates","description":"The **Templates API** allows you to create, manage, and delete certificate templates. Templates define the visual layout of a certificate, including background images and dynamic fields such as recipient name, issue date, and QR codes.\n\nThis section covers all template-related endpoints:\n\n---\n\n## 1\\. Get All Templates\n\n### Endpoint\n\n`GET /api/templates`\n\n### Description\n\nFetches all templates available to your account (or sub-account if provided).\n\n### Headers\n\n- **`x-api-key`** _(required)_ – Your API key from the Akowe dashboard.\n    \n- **`x-subaccount-email`** _(optional)_ – Filters results to templates created by the specified sub-account.\n    \n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27;\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n      \"name\": \"Demo Template\",\n      \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n      \"fields\": [\n        {\n          \"id\": \"997a7a31-a5eb-4b6a-bb01-f2b60c848171\",\n          \"type\": \"name\",\n          \"text\": \"Display Name\",\n          \"fontSize\": 16,\n          \"fontFamily\": \"Arial\",\n          \"color\": \"#000000\",\n          \"isBold\": false,\n          \"isItalic\": false,\n          \"alignment\": \"center\",\n          \"x\": 50,\n          \"y\": 40\n        }\n      ],\n      \"dimensions\": {\n        \"width\": 2560,\n        \"height\": 1920\n      },\n      \"subAccountEmail\": \"johndoe@email.com\",\n      \"createdAt\": \"2025-09-24T18:23:43.621Z\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## 2\\. Create Template\n\n### Endpoint\n\n`POST /api/templates`\n\n### Description\n\nCreates a new certificate template with a background image, dimensions, and defined fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`x-subaccount-email`** _(optional but recommended)_ – Links the template to a specific sub-account.\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `name` | string | ✅ Yes | The template name. |\n| `imageUrl` | string | ✅ Yes | Base64 string or image URL for the background. |\n| `dimensions` | object | ✅ Yes | Width and height of the template. |\n| `fields` | array | ✅ Yes | List of field definitions (e.g., name, date, QR). |\n\n### Example Request\n\n``` bash\ncurl --location '{{baseurl}}/api/templates' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'x-subaccount-email: johndoe@email.com' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"name\": \"Demo\",\n  \"imageUrl\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQU//Z\",\n  \"dimensions\": {\n    \"width\": 2560,\n    \"height\": 1920\n  },\n  \"fields\": [\n    {\n      \"type\": \"name\",\n      \"text\": \"Display Name\",\n      \"x\": 50,\n      \"y\": 40,\n      \"fontSize\": 16,\n      \"fontFamily\": \"Arial\",\n      \"color\": \"#000000\",\n      \"isBold\": false,\n      \"isItalic\": false,\n      \"alignment\": \"center\"\n    }\n  ]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template created successfully\",\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    },\n    \"fields\": [\n      {\n        \"id\": \"8fa5eacf-34e3-4115-82c8-356edc9ccd6f\",\n        \"type\": \"name\",\n        \"text\": \"Display Name\",\n        \"x\": 50,\n        \"y\": 40\n      }\n    ]\n  }\n}\n\n ```\n\n---\n\n## 3\\. Edit Template\n\n### Endpoint\n\n`PUT /api/templates/{templateId}`\n\n### Description\n\nUpdates an existing template’s details and fields.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n- **`Content-Type`**: `application/json`\n    \n\n### Example Request\n\n``` bash\ncurl --location --request PUT '{{baseurl}}/api/templates/{templateId}' \\\n--header &#x27;x-api-key: <your_api_key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Demo Edited\",\n  \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n  \"fields\": [...]\n}'\n\n ```\n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template updated successfully\"\n}\n\n ```\n\n---\n\n## 4\\. Get Template by ID\n\n### Endpoint\n\n`GET /api/templates/{templateId}`\n\n### Description\n\nFetches the details of a specific template.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"290e4c3b-1da4-4f7e-811d-30dde4f8858d\",\n    \"name\": \"Demo Edited\",\n    \"imageUrl\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/template.jpeg\",\n    \"fields\": [...],\n    \"dimensions\": {\n      \"width\": 2560,\n      \"height\": 1920\n    }\n  }\n}\n\n ```\n\n---\n\n## 5\\. Delete Template\n\n### Endpoint\n\n`DELETE /api/templates/{templateId}`\n\n### Description\n\nDeletes a specific template permanently.\n\n### Headers\n\n- **`x-api-key`** _(required)_\n    \n\n### Example Response\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/templates/290e4c3b-1da4-4f7e-811d-30dde4f8858d":{"delete":{"tags":["Templates"],"summary":"Delete Template","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}},{"name":"x-subaccount-email","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````


# Organization

Organizations represent the entities (such as schools, companies, or institutions) under which certificates and templates are managed. Each organization record contains essential details like the organization’s name, contact information, and website.

These endpoints allow you to **create, fetch, list, and delete organizations** associated with your account.

#### Authentication

All requests must include your API key in the request headers:

* `x-api-key` *(required)* – Your unique API key from the Akowe dashboard.

***

### Create Organization

**Endpoint**:

```http
POST /api/profile/organization

```

**Description**:

Creates a new organization with details such as name, email, website, and phone number.

**Sample Request**:

```bash
curl --location '{{baseurl}}/api/profile/organization' \
--header &#x27;x-api-key: <your-api-key>&#x27; \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Akowe", 
  "website": "https://akowe.app",
  "email": "organization@email.com",
  "phone":"080123456789", 
  "logo": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAe" 
}'

```

**Sample Response**:

```json
{
  "success": true,
  "message": "Organization has been created successfully",
  "data": {
    "id": "b2bf6b4e-bb07-45ab-b5d0-c43544d2d107",
    "name": "Akowe", 
    "website": "https://akowe.app",
    "email": "organization@email.com",
    "phone":"080123456789", 
    "logo": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAe"
  }
}

```

***

### Get Organization

**Endpoint**:

```http
GET /api/profile/organization/{organizationId}

```

**Description**:

Fetches details of a specific organization by its unique ID.

**Sample Request**:

```bash
curl --location '{{baseurl}}/api/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10' \
--header &#x27;x-api-key: <your-api-key>&#x27;

```

**Sample Response**:

```json
{
  "success": true,
  "message": "",
  "data": {
    "id": "19ac76e7-8638-487c-861f-6565351b2f10",
    "name": "Akowe", 
    "website": "https://akowe.app",
    "email": "organization@email.com",
    "phone":"080123456789", 
    "logo": ""
  }
}

```

***

### Get Organizations

**Endpoint**:

```http
GET /api/profile/organization

```

**Description**:

Retrieves a list of all organizations linked to your account or sub-account.

**Sample Request**:

```bash
curl --location '{{baseurl}}/api/profile/organization' \
--header &#x27;x-api-key: <your-api-key>&#x27;;

```

**Sample Response**:

```json
{
  "success": true,
  "message": "",
  "data": [
    {
      "id": "ec8566dd-56bd-49d0-b4ae-04df88cd62e9",
      "name": "Akowe",
      "email": "organization@email.com",
      "logo": "https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/organization1.jpeg",
      "website": "https://akowe.app",
      "phone": "080123456789"
    }
  ]
}

```

***

### Delete Organization

**Endpoint**:

```http
DELETE /api/profile/organization/{organizationId}

```

**Description**:

Deletes a specific organization by its unique ID.

**Sample Request**:

```bash
curl --location --request DELETE '{{baseurl}}/api/profile/organization/b7013631-bc7a-40ec-96e2-13b5e67c3d02' \
--header &#x27;x-api-key: <your-api-key>&#x27;

```

**Sample Response**:

```json
{
  "success": true,
  "message": "Organization deleted successfully"
}

```

## GET /profile/organization

> Get Issuing Organizations

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Organization","description":"Organizations represent the entities (such as schools, companies, or institutions) under which certificates and templates are managed. Each organization record contains essential details like the organization’s name, contact information, and website.\n\nThese endpoints allow you to **create, fetch, list, and delete organizations** associated with your account.\n\n### Authentication\n\nAll requests must include your API key in the request headers:\n\n- `x-api-key` _(required)_ – Your unique API key from the Akowe dashboard.\n    \n\n---\n\n## Create Organization\n\n**Endpoint**:\n\n``` http\nPOST /api/profile/organization\n\n ```\n\n**Description**:\n\nCreates a new organization with details such as name, email, website, and phone number.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Akowe\", \n  \"website\": \"https://akowe.app\",\n  \"email\": \"organization@email.com\",\n  \"phone\":\"080123456789\", \n  \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\" \n}'\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization has been created successfully\",\n  \"data\": {\n    \"id\": \"b2bf6b4e-bb07-45ab-b5d0-c43544d2d107\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\"\n  }\n}\n\n ```\n\n---\n\n## Get Organization\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nFetches details of a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": {\n    \"id\": \"19ac76e7-8638-487c-861f-6565351b2f10\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"\"\n  }\n}\n\n ```\n\n---\n\n## Get Organizations\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization\n\n ```\n\n**Description**:\n\nRetrieves a list of all organizations linked to your account or sub-account.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"ec8566dd-56bd-49d0-b4ae-04df88cd62e9\",\n      \"name\": \"Akowe\",\n      \"email\": \"organization@email.com\",\n      \"logo\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/organization1.jpeg\",\n      \"website\": \"https://akowe.app\",\n      \"phone\": \"080123456789\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## Delete Organization\n\n**Endpoint**:\n\n``` http\nDELETE /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nDeletes a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location --request DELETE '{{baseurl}}/api/profile/organization/b7013631-bc7a-40ec-96e2-13b5e67c3d02' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/profile/organization":{"get":{"tags":["Organization"],"summary":"Get Issuing Organizations","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## POST /profile/organization

> Create Issuing Organization

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Organization","description":"Organizations represent the entities (such as schools, companies, or institutions) under which certificates and templates are managed. Each organization record contains essential details like the organization’s name, contact information, and website.\n\nThese endpoints allow you to **create, fetch, list, and delete organizations** associated with your account.\n\n### Authentication\n\nAll requests must include your API key in the request headers:\n\n- `x-api-key` _(required)_ – Your unique API key from the Akowe dashboard.\n    \n\n---\n\n## Create Organization\n\n**Endpoint**:\n\n``` http\nPOST /api/profile/organization\n\n ```\n\n**Description**:\n\nCreates a new organization with details such as name, email, website, and phone number.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Akowe\", \n  \"website\": \"https://akowe.app\",\n  \"email\": \"organization@email.com\",\n  \"phone\":\"080123456789\", \n  \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\" \n}'\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization has been created successfully\",\n  \"data\": {\n    \"id\": \"b2bf6b4e-bb07-45ab-b5d0-c43544d2d107\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\"\n  }\n}\n\n ```\n\n---\n\n## Get Organization\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nFetches details of a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": {\n    \"id\": \"19ac76e7-8638-487c-861f-6565351b2f10\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"\"\n  }\n}\n\n ```\n\n---\n\n## Get Organizations\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization\n\n ```\n\n**Description**:\n\nRetrieves a list of all organizations linked to your account or sub-account.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"ec8566dd-56bd-49d0-b4ae-04df88cd62e9\",\n      \"name\": \"Akowe\",\n      \"email\": \"organization@email.com\",\n      \"logo\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/organization1.jpeg\",\n      \"website\": \"https://akowe.app\",\n      \"phone\": \"080123456789\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## Delete Organization\n\n**Endpoint**:\n\n``` http\nDELETE /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nDeletes a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location --request DELETE '{{baseurl}}/api/profile/organization/b7013631-bc7a-40ec-96e2-13b5e67c3d02' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/profile/organization":{"post":{"tags":["Organization"],"summary":"Create Issuing Organization","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## DELETE /profile/organization/b2bf6b4e-bb07-45ab-b5d0-c43544d2d107

> Delete Issuing Organization

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Organization","description":"Organizations represent the entities (such as schools, companies, or institutions) under which certificates and templates are managed. Each organization record contains essential details like the organization’s name, contact information, and website.\n\nThese endpoints allow you to **create, fetch, list, and delete organizations** associated with your account.\n\n### Authentication\n\nAll requests must include your API key in the request headers:\n\n- `x-api-key` _(required)_ – Your unique API key from the Akowe dashboard.\n    \n\n---\n\n## Create Organization\n\n**Endpoint**:\n\n``` http\nPOST /api/profile/organization\n\n ```\n\n**Description**:\n\nCreates a new organization with details such as name, email, website, and phone number.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Akowe\", \n  \"website\": \"https://akowe.app\",\n  \"email\": \"organization@email.com\",\n  \"phone\":\"080123456789\", \n  \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\" \n}'\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization has been created successfully\",\n  \"data\": {\n    \"id\": \"b2bf6b4e-bb07-45ab-b5d0-c43544d2d107\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\"\n  }\n}\n\n ```\n\n---\n\n## Get Organization\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nFetches details of a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": {\n    \"id\": \"19ac76e7-8638-487c-861f-6565351b2f10\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"\"\n  }\n}\n\n ```\n\n---\n\n## Get Organizations\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization\n\n ```\n\n**Description**:\n\nRetrieves a list of all organizations linked to your account or sub-account.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"ec8566dd-56bd-49d0-b4ae-04df88cd62e9\",\n      \"name\": \"Akowe\",\n      \"email\": \"organization@email.com\",\n      \"logo\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/organization1.jpeg\",\n      \"website\": \"https://akowe.app\",\n      \"phone\": \"080123456789\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## Delete Organization\n\n**Endpoint**:\n\n``` http\nDELETE /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nDeletes a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location --request DELETE '{{baseurl}}/api/profile/organization/b7013631-bc7a-40ec-96e2-13b5e67c3d02' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/profile/organization/b2bf6b4e-bb07-45ab-b5d0-c43544d2d107":{"delete":{"tags":["Organization"],"summary":"Delete Issuing Organization","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````

## GET /profile/organization/19ac76e7-8638-487c-861f-6565351b2f10

> Get Issuing Organization

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Organization","description":"Organizations represent the entities (such as schools, companies, or institutions) under which certificates and templates are managed. Each organization record contains essential details like the organization’s name, contact information, and website.\n\nThese endpoints allow you to **create, fetch, list, and delete organizations** associated with your account.\n\n### Authentication\n\nAll requests must include your API key in the request headers:\n\n- `x-api-key` _(required)_ – Your unique API key from the Akowe dashboard.\n    \n\n---\n\n## Create Organization\n\n**Endpoint**:\n\n``` http\nPOST /api/profile/organization\n\n ```\n\n**Description**:\n\nCreates a new organization with details such as name, email, website, and phone number.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27; \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"name\": \"Akowe\", \n  \"website\": \"https://akowe.app\",\n  \"email\": \"organization@email.com\",\n  \"phone\":\"080123456789\", \n  \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\" \n}'\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization has been created successfully\",\n  \"data\": {\n    \"id\": \"b2bf6b4e-bb07-45ab-b5d0-c43544d2d107\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAe\"\n  }\n}\n\n ```\n\n---\n\n## Get Organization\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nFetches details of a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": {\n    \"id\": \"19ac76e7-8638-487c-861f-6565351b2f10\",\n    \"name\": \"Akowe\", \n    \"website\": \"https://akowe.app\",\n    \"email\": \"organization@email.com\",\n    \"phone\":\"080123456789\", \n    \"logo\": \"\"\n  }\n}\n\n ```\n\n---\n\n## Get Organizations\n\n**Endpoint**:\n\n``` http\nGET /api/profile/organization\n\n ```\n\n**Description**:\n\nRetrieves a list of all organizations linked to your account or sub-account.\n\n**Sample Request**:\n\n``` bash\ncurl --location '{{baseurl}}/api/profile/organization' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"id\": \"ec8566dd-56bd-49d0-b4ae-04df88cd62e9\",\n      \"name\": \"Akowe\",\n      \"email\": \"organization@email.com\",\n      \"logo\": \"https://academicrecords.s3.eu-west-2.amazonaws.com/issuance/organization1.jpeg\",\n      \"website\": \"https://akowe.app\",\n      \"phone\": \"080123456789\"\n    }\n  ]\n}\n\n ```\n\n---\n\n## Delete Organization\n\n**Endpoint**:\n\n``` http\nDELETE /api/profile/organization/{organizationId}\n\n ```\n\n**Description**:\n\nDeletes a specific organization by its unique ID.\n\n**Sample Request**:\n\n``` bash\ncurl --location --request DELETE '{{baseurl}}/api/profile/organization/b7013631-bc7a-40ec-96e2-13b5e67c3d02' \\\n--header &#x27;x-api-key: <your-api-key>&#x27;\n\n ```\n\n**Sample Response**:\n\n``` json\n{\n  \"success\": true,\n  \"message\": \"Organization deleted successfully\"\n}\n\n ```"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/profile/organization/19ac76e7-8638-487c-861f-6565351b2f10":{"get":{"tags":["Organization"],"summary":"Get Issuing Organization","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````


# Misc

### Balance

The **Balance** endpoint allows you to retrieve the current credit balance available in your Akowe account.

Credits are required to issue certificates, so this endpoint helps you track how many issuances you can perform.

#### Endpoint

```
GET {{baseurl}}/api/users/balance

```

#### Headers

| Header      | Required | Description                                   |
| ----------- | -------- | --------------------------------------------- |
| `x-api-key` | ✅ Yes    | Your unique API key from the Akowe dashboard. |

#### Sample Request

```bash
curl --location '{{baseurl}}/api/users/balance' \
--header 'x-api-key: live-f512814e-9a17-4a67-a567-54f02d5c7317-0-a13c1092-e8d7-473c-b3e0-a80b50c5d672' \
--data ''

```

#### Successful Response

```json
{
  "success": true,
  "data": {
    "balance": 6
  }
}

```

#### Notes

* `balance` indicates the number of certificate issuances remaining.
* If the balance is `0`, you will need to purchase additional credits before issuing new certificates.

***

## GET /api/users/balance

> Balance

````json
{"openapi":"3.0.0","info":{"title":"Akowe Issuance API Endpoints","version":"1.0.0"},"tags":[{"name":"Misc","description":"## Balance\n\nThe **Balance** endpoint allows you to retrieve the current credit balance available in your Akowe account.  \n  \nCredits are required to issue certificates, so this endpoint helps you track how many issuances you can perform.\n\n### Endpoint\n\n```\nGET {{baseurl}}/api/users/balance\n\n ```\n\n### Headers\n\n| Header | Required | Description |\n| --- | --- | --- |\n| `x-api-key` | ✅ Yes | Your unique API key from the Akowe dashboard. |\n\n### Sample Request\n\n``` bash\ncurl --location '{{baseurl}}/api/users/balance' \\\n--header 'x-api-key: live-f512814e-9a17-4a67-a567-54f02d5c7317-0-a13c1092-e8d7-473c-b3e0-a80b50c5d672' \\\n--data ''\n\n ```\n\n### Successful Response\n\n``` json\n{\n  \"success\": true,\n  \"data\": {\n    \"balance\": 6\n  }\n}\n\n ```\n\n### Notes\n\n- `balance` indicates the number of certificate issuances remaining.\n    \n- If the balance is `0`, you will need to purchase additional credits before issuing new certificates.\n    \n\n---"}],"servers":[{"url":"http://{{baseurl}}"}],"paths":{"/api/users/balance":{"get":{"tags":["Misc"],"summary":"Balance","parameters":[{"name":"x-api-key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
````


