Skip to main content
GET
/
workflows
/
{workflowId}
/
leads
/
variable-keys
Get workflow variable keys
curl --request GET \
  --url https://api.dialnexa.com/v1/workflows/{workflowId}/leads/variable-keys \
  --header 'Authorization: Bearer <token>'
{
  "keys": [
    "customer_name",
    "loan_amount",
    "product"
  ]
}
Returns the list of dynamic variable keys derived from the column headers of the lead files uploaded to this workflow. These keys are what you can reference inside an agent’s prompt using the {{variable_name}} template syntax. For example, if a lead file contained the columns phone_number, name, city, and product, this endpoint returns the variable list ["name", "city", "product"]: phone_number is excluded because it is reserved as the dial target rather than a personalization variable.

When to use this

  • Prompt editors: populate an autocomplete or “available variables” panel so the prompt author can only reference variables that actually exist on this workflow’s leads.
  • Validation pipelines: verify a prompt template before publishing an agent change. Reject the deploy if it references a {{variable_name}} that does not appear in this list.
  • Workflow audits: confirm a newly uploaded lead file produces the columns the prompt expects, especially after editing the upload schema.
The keys returned reflect the union of all lead-file column headers ever uploaded to the workflow. If a column disappeared from later uploads, its key may still appear here; treat the list as “available”, not “always populated per lead”.

Path parameters

ParameterDescription
workflowIdThe workflow ID, for example wfl_m3v7zb9rk2px.

Errors

  • 404 Not Found is returned when the workflow does not exist.
  • 403 Forbidden is returned when the API key cannot read workflows on this workspace.

Request

curl "https://api.dialnexa.com/v1/workflows/wfl_m3v7zb9rk2px/leads/variable-keys" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "variable_keys": ["name", "city", "product", "phone_number"]
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token in the Authorization header.

Path Parameters

workflowId
string
required

Response

200 - application/json

Success.

keys
string[]
Example:
["customer_name", "loan_amount", "product"]