{
  "info": {
    "name": "CredCanvas API v1",
    "description": "Public API documentation for CredCanvas. Use these endpoints to automate certificate generation and fetch details programmatically.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Jobs",
      "item": [
        {
          "name": "List Jobs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/jobs",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "jobs"
              ]
            },
            "description": "List all jobs."
          }
        },
        {
          "name": "Create Job",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Batch via API\",\n  \"event_id\": \"uuid-of-event\",\n  \"certificate_template_id\": \"uuid-of-template\",\n  \"data_source\": [\n    {\n      \"name\": \"Jane Doe\",\n      \"email\": \"jane@example.com\"\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/jobs/create",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "jobs",
                "create"
              ]
            },
            "description": "Create a new certificate issuance job."
          }
        },
        {
          "name": "Get Job Status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/jobs/{{job_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "jobs",
                "{{job_id}}"
              ]
            },
            "description": "Retrieve the current status of an issuance job."
          }
        },
        {
          "name": "Delete Job",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/jobs/{{job_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "jobs",
                "{{job_id}}"
              ]
            },
            "description": "Delete a job."
          }
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "List Events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/events",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "events"
              ]
            },
            "description": "Returns a list of all events for the organization."
          }
        },
        {
          "name": "Create Event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"New API Event\",\n  \"description\": \"Created via API\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/events",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "events"
              ]
            },
            "description": "Create a new event."
          }
        },
        {
          "name": "Get Event",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/events/{{event_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "events",
                "{{event_id}}"
              ]
            },
            "description": "Get a single event."
          }
        },
        {
          "name": "Update Event",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Updated Event Name\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/events/{{event_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "events",
                "{{event_id}}"
              ]
            },
            "description": "Update an event."
          }
        },
        {
          "name": "Delete Event",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/events/{{event_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "events",
                "{{event_id}}"
              ]
            },
            "description": "Delete an event."
          }
        }
      ]
    },
    {
      "name": "Templates",
      "item": [
        {
          "name": "List Templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/templates",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "templates"
              ]
            },
            "description": "Returns a list of all certificate templates."
          }
        },
        {
          "name": "Get Template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/templates/{{template_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "templates",
                "{{template_id}}"
              ]
            },
            "description": "Get a single certificate template."
          }
        }
      ]
    },
    {
      "name": "Certificates",
      "item": [
        {
          "name": "List Certificates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/certificates",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "certificates"
              ]
            },
            "description": "List issued certificates."
          }
        },
        {
          "name": "Get Certificate",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/certificates/{{certificate_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "certificates",
                "{{certificate_id}}"
              ]
            },
            "description": "Get details of an issued certificate."
          }
        },
        {
          "name": "Revoke Certificate",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/certificates/{{certificate_id}}/revoke",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "certificates",
                "{{certificate_id}}",
                "revoke"
              ]
            },
            "description": "Revoke an issued certificate."
          }
        },
        {
          "name": "Verify Certificate",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/certificates/{{certificate_id}}/verify",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "certificates",
                "{{certificate_id}}",
                "verify"
              ]
            },
            "description": "Verify if a certificate is valid."
          }
        }
      ]
    },
    {
      "name": "Email Templates",
      "item": [
        {
          "name": "List Email Templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/email-templates",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "email-templates"
              ]
            },
            "description": "Returns a list of all email templates."
          }
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "Get Usage",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/account/usage",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "account",
                "usage"
              ]
            },
            "description": "Get account usage."
          }
        },
        {
          "name": "Get Plan",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/account/plan",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "account",
                "plan"
              ]
            },
            "description": "Get account plan."
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.credcanvas.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "cm_...",
      "type": "string"
    },
    {
      "key": "job_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "event_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "template_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "certificate_id",
      "value": "",
      "type": "string"
    }
  ]
}