Workflow Leads
Get Variable Keys
deprecated
Retrieve the dynamic variable keys derived from the columns of leads uploaded into a workflow.
GET
Get distinct dynamic variable keys from workflow leads (CSV columns)
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.
Path parameters
Errors
404 Not Foundis returned when the workflow does not exist.403 Forbiddenis returned when the API key cannot read workflows on this workspace.
Related endpoints
- List Workflow Leads: view enrolled leads.
- Upload Workflow Leads: programmatically enroll a single lead with arbitrary variables.
- Dynamic variables: guidance on referencing variables inside prompts.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
RSA encrypted organization ID (base64 format)
Example:
"BASE64_ENCRYPTED_ORG_ID_HERE"
Path Parameters
Response
200
List of variable keys
Get distinct dynamic variable keys from workflow leads (CSV columns)