Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Variables

List variables

GET/v1/variables

The variable catalogue: every variable the account’s templates can use, with where each is used. System variables first, then global ones, then template variables, each sorted by name.

Requires a full-access key.

kind is system (filled by ZapSMTP), global (set for the account, written {{global.key}}) or template (a template’s own).

A global variable that templates use but that has no value yet is listed without value; sends with those templates fail until you set it.

A template variable lists in types every type its templates declare, and per template its type, required, default and unused (declared, but the source no longer names it).

Errors

restricted_api_keyHTTP 403
GET/v1/variables
curl 'https://zapsmtp.xyz/v1/variables' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "variable",
      "name": "zap:unsubscribe_url",
      "kind": "system",
      "type": "url",
      "description": "The recipient's one-click unsubscribe link (also adds List-Unsubscribe).",
      "templates": []
    },
    {
      "object": "variable",
      "name": "global.company_name",
      "kind": "global",
      "type": "string",
      "key": "company_name",
      "value": "Acme Inc.",
      "description": "Legal name for footers",
      "updated_at": "2026-10-25T14:20:00Z",
      "templates": [
        {
          "id": "019a1f23-7f80-7192-8b3c-4d5e6f7a8b9c",
          "name": "Receipt"
        }
      ]
    },
    {
      "object": "variable",
      "name": "global.support_url",
      "kind": "global",
      "type": "string",
      "key": "support_url",
      "templates": [
        {
          "id": "019a1f23-7f80-7192-8b3c-4d5e6f7a8b9c",
          "name": "Receipt"
        }
      ]
    },
    {
      "object": "variable",
      "name": "coupon",
      "kind": "template",
      "types": [
        "object"
      ],
      "templates": [
        {
          "id": "019a1f23-7f80-7192-8b3c-4d5e6f7a8b9c",
          "name": "Receipt",
          "type": "object"
        }
      ]
    },
    {
      "object": "variable",
      "name": "order_id",
      "kind": "template",
      "types": [
        "string"
      ],
      "description": "Order number shown to the customer",
      "templates": [
        {
          "id": "019a1f23-7f80-7192-8b3c-4d5e6f7a8b9c",
          "name": "Receipt",
          "type": "string",
          "required": true
        }
      ]
    }
  ]
}