Preview: SendMock has no stable release yet. These docs follow develop.

CLI reference

Webhook variables commands

sendmock webhook var list

Global and endpoint variables; secret values are masked.

sendmock webhook var list [flags]
FlagTypeDescription
--endpoint-id <endpoint-id>string
Only this endpoint's variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock webhook var list

Output with --json: WebhookVariable[]. Exit codes: 0, 1, 2.

API
GET/api/v1/webhooks/variables
MCP tool
sendmock_webhook_variable_list
In the app
Webhooks > Variables

sendmock webhook var preview

What a variable definition resolves to against the sample.

sendmock webhook var preview [flags]
FlagTypeDescription
--kind <kind>requiredstring
The variable kind, as in a variable.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: random
--value <value>requiredstring
The value, expression or generator to try.Example: random_string(16)

Example

sendmock webhook var preview --kind random --value 'random_string(16)'

Output with --json: VariablePreviewResult. Exit codes: 0, 1, 2.

API
POST/api/v1/webhooks/variables/preview
MCP tool
sendmock_webhook_variable_preview
In the app
Webhooks > Variables > variable sheet > Resolves to

sendmock webhook var regenerate

Make a new fixed value for a generated-once random variable.

sendmock webhook var regenerate <variableId>
ArgumentTypeDescription
<variableId>requiredstring
The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock webhook var regenerate 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: WebhookVariable. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/webhooks/variables/{variableId}/regenerate
MCP tool
sendmock_webhook_variable_regenerate
In the app
Webhooks > Variables > Regenerate

sendmock webhook var set

Add a variable.

sendmock webhook var set <name> <value> [flags]
ArgumentTypeDescription
<name>requiredstring
The name templates read it by, as {{ vars.<name> }}.Example: tenant_id
<value>requiredstring
Static value, expression, generator or default; secrets are masked.Example: acme
FlagTypeDescription
--kind <kind>requiredstring
text, number, boolean, json and secret are fixed values; dynamic is read from the event, random is generated, computed combines other variables and prompt is asked for on manual sends.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: text
--scope <scope>requiredstring
global for every endpoint, or endpoint for one; endpoint values win.One of: global, endpointExample: global
--endpoint-id <endpoint-id>string
The endpoint of an endpoint variable; null for global ones.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--random-mode <random-mode>string
For random: per_send generates a new value each time, fixed keeps one value until Regenerate; null for other kinds.One of: per_send, fixedExample: per_send
--description <description>requiredstring
What the variable is for.Example: Tenant every webhook is sent for

Example

sendmock webhook var set tenant_id acme --kind text --scope global --description 'Tenant every webhook is sent for' --random-mode per_send

Output with --json: WebhookVariable. Exit codes: 0, 1, 2.

API
POST/api/v1/webhooks/variables
MCP tool
sendmock_webhook_variable_set
In the app
Webhooks > Variables > Add variable

sendmock webhook var unset

Delete a variable.

sendmock webhook var unset <variableId> [flags]
ArgumentTypeDescription
<variableId>requiredstring
The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock webhook var unset 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes

Output with --json: nothing. Exit codes: 0, 1, 2, 3.

API
DELETE/api/v1/webhooks/variables/{variableId}
MCP tool
sendmock_webhook_variable_unset
In the app
Webhooks > Variables > Delete

sendmock webhook var update

Change a variable.

sendmock webhook var update <variableId> [flags]
ArgumentTypeDescription
<variableId>requiredstring
The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--name <name>requiredstring
The name templates read it by, as {{ vars.<name> }}.Example: tenant_id
--kind <kind>requiredstring
text, number, boolean, json and secret are fixed values; dynamic is read from the event, random is generated, computed combines other variables and prompt is asked for on manual sends.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: text
--scope <scope>requiredstring
global for every endpoint, or endpoint for one; endpoint values win.One of: global, endpointExample: global
--endpoint-id <endpoint-id>string
The endpoint of an endpoint variable; null for global ones.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--value <value>requiredstring
Static value, expression, generator or default; secrets are masked.Example: acme
--random-mode <random-mode>string
For random: per_send generates a new value each time, fixed keeps one value until Regenerate; null for other kinds.One of: per_send, fixedExample: per_send
--description <description>requiredstring
What the variable is for.Example: Tenant every webhook is sent for

Example

sendmock webhook var update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --name tenant_id --kind text --scope global --value acme --description 'Tenant every webhook is sent for' --random-mode per_send

Output with --json: WebhookVariable. Exit codes: 0, 1, 2, 3.

API
PATCH/api/v1/webhooks/variables/{variableId}
MCP tool
sendmock_webhook_variable_update
In the app
Webhooks > Variables > Edit