{
  "info": {
    "_postman_id": "a7634f37-8bd4-55ac-a166-b486eea6281c",
    "name": "Qlara API - Subscription",
    "description": "The Subscription section of API Reference in the Qlara documentation.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "id": "6d3cb03f-a9d6-53e9-aaea-955a8c5e960d",
      "name": "Get active subscription",
      "request": {
        "name": "Get active subscription",
        "description": {
          "content": "Returns the subscription plan currently active for your account.\n\n- **Plan**: `planCode` (such as `monthly_pro` or `annual_business`) and `status`, which is `active` for the subscription in force.\n- **Billing period**: `billingPeriodStart` and `billingPeriodEnd` bound the current invoicing cycle. At its end the plan renews, unless it has been canceled.\n- **Usage counters**: `nextRenew` is their next reset. On an annual plan it comes every month, well before `billingPeriodEnd`.\n- **Cancellation**: if `canceled` is true while `status` is still `active`, the plan stays usable until the end of the current billing period and then does not renew. `nextPlan`, when set, is the plan that takes over.\n\nUse it to check your plan before calling features that depend on the plan level, or to show the subscription in your own dashboard.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "subscription"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": []
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "GET",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        }
      },
      "response": [
        {
          "id": "1347c665-b17e-5dee-a66c-315e17b1037b",
          "name": "The active subscription.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"planCode\": \"annual_business\",\n  \"status\": \"active\",\n  \"billingPeriodStart\": \"2026-10-02T16:12:17+02:00\",\n  \"billingPeriodEnd\": \"2027-10-02T01:59:59+02:00\",\n  \"nextRenew\": \"2026-11-01T23:00:00Z\",\n  \"canceled\": false,\n  \"nextPlan\": null\n}",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "454eacda-0449-58a8-a583-d5459e5df809",
          "name": "The API key is missing, invalid, or lacks the `SUBSCRIPTION` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "09305852-feca-5997-ad57-9f2c43f131d9",
          "name": "No active subscription for your account.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Not Found",
          "code": 404,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "bfd7be2b-1f1d-5d13-aab1-224f4e54deb8",
          "name": "The subscription service is temporarily unavailable.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Bad Gateway",
          "code": 502,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    },
    {
      "id": "10974bac-f276-53af-afef-1a14b5101e12",
      "name": "Get credit balance",
      "request": {
        "name": "Get credit balance",
        "description": {
          "content": "Returns the credit balance of your account as three values, all expressed in credits. Credit is what pays for message sending and the other billable operations of the platform.\n\n- **`credit`**: your total balance, frozen credit included.\n- **`frozenCredit`**: credit reserved for operations still in progress, such as scheduled campaigns queued but not yet fully delivered. It cannot be spent until those operations complete or are canceled.\n- **`availableCredit`**: what you can spend right now, that is `credit` minus `frozenCredit`.\n- **No credits yet**: all three values are 0.\n\nCheck it before a large campaign: if the available credit does not cover the cost, the campaign or the send can be refused. Top up from the billing dashboard or through your account manager.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "subscription",
            "credit"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": []
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "GET",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        }
      },
      "response": [
        {
          "id": "e09d1713-a7b3-5cdf-ad3c-80c2d414d09e",
          "name": "The credit balance of your account.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription",
                "credit"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"credit\": 50000,\n  \"frozenCredit\": 5000,\n  \"availableCredit\": 45000\n}",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "33f727a6-dcce-5e0d-aa20-37154d706420",
          "name": "The API key is missing, invalid, or lacks the `SUBSCRIPTION` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription",
                "credit"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "563fc4ba-abda-5aca-af66-a32012af5719",
          "name": "The wallet service is temporarily unavailable.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "subscription",
                "credit"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Bad Gateway",
          "code": 502,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-Api-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.qlara.ai",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "YOUR_API_KEY",
      "type": "string"
    }
  ]
}
