Variables
Store reusable values, HTML, CSS, JSON, and secrets once, then reference them across tools, templates, and API requests.
Overview
Variables are reusable values scoped to your organization. Use them when the same content appears in tool requests, PDF templates, or internal workflows.
Types and formats
Value variables
Use value for plain reusable content. It is the default choice for text, JSON, HTML, CSS, and other non-sensitive data.
Good for company names, fixed payload fragments, template blocks, and any content you want to reference directly.
Secret variables
Use secret for sensitive values such as internal tokens or signing keys. These values are encrypted at rest and masked in API responses.
Secret variables are not for third-party service credentials. Use Connections for external service secrets.
Formats
The format field is only a display hint for the UI. Current formats are text, json, html, and css.
Format does not change how the value works. It only helps the editor and docs show the content in a readable way.
Usage Syntax
Reference a saved variable
Use [[var:key]] to insert a saved variable into a request body or template field.
{
"html": "[[var:invoice-template-html]]",
"css": "[[var:invoice-template-css]]"
}
Use template data directly
Inside templates, [[variable]] inserts a top-level field from the JSON data you send, and [[customer.name]] inserts a nested field.
{
"name": "[[customer.name]]",
"total": "[[invoice.total]]"
}
API endpoints
Variables are available through the API under https://nisastack.com/api/variables.
List variables
GET /api/variables returns the variables for the current organization. Use the type query string to filter by value or secret.
Create a variable
POST /api/variables creates a new variable.
{
"name": "Invoice HTML",
"key": "invoice-template-html",
"type": "value",
"format": "html",
"value": "<h1>Invoice #[[invoice.number]]</h1>"
}
Read, update, delete
Use GET /api/variables/{key}, PUT /api/variables/{key}, and DELETE /api/variables/{key} to manage a single variable.
Additional notes
- Variable keys must be unique within an organization.
secretvalues are encrypted at rest and masked in API responses.formatonly changes how the value is shown in the UI.- Use
[[var:...]]to insert a saved variable. - Use
[[variable]]for top-level JSON fields and[[customer.name]]for nested fields.
Next steps
Create a variable in your organization, then reference it in a tool request or PDF template.