rename_custom_variable
Rename a custom variable, i.e. change the {{token}} it is written as. THIS IS SAFE AND CHEAP: values stored on leads and the bodies of campaign messages reference the variable by its id, never by its name, so a rename updates one registry row and leaves every stored value and every message body byte-for-byte identical. Nothing is orphaned, no campaign breaks, and nothing has to be re-pushed. It costs the same on a workspace with four million leads as on one with four. Use this whenever the user wants a different name for an existing variable, INSTEAD of creating a new variable and migrating; creating a duplicate is the wrong move and leaves two half-populated variables behind. Use update_custom_variable instead when the label, default value, or description is what needs to change. The new token is normalized ('Recent Funding' becomes recent_funding); renaming to the name it already has succeeds quietly. Errors: 409 token_taken (another variable already uses that name, so pick a different one, this API will not merge two variables), 400 reserved_token (collides with a built-in), 400 invalid_token (the name normalizes to nothing, e.g. '###').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"custom_variable_id": "<custom_variable_id>",
"token": "<token>"
},
"name": "rename_custom_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | The NEW name, WITHOUT braces, e.g. 'recent_round' for {{recent_round}}. | |
| idempotency_key | No | UUID for safe retry. | |
| custom_variable_id | Yes | Id of the variable to rename, from list_custom_variables. |