Switch a code off or on
switch_codeWith the key: switches an existing code off, or back on. Use it to pause a code and keep what it does, for a sticker that is lost or a campaign that is over. To change what a scan does, use set_code. A switched-off code shows a notice and nothing else until it is switched back on. A blank code can be switched off too: a scan then cannot set it up. Returns the code with its new state.
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": {
"code": "<code>",
"token": "<token>",
"on": "<on>"
},
"name": "switch_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | Yes | false switches the code off, true switches it back on. What the code does is kept either way. | |
| code | Yes | The 7 characters at the end of the code's short address, the part after the last slash. | |
| token | Yes | The key of the code, from the answer that made it. With an account key, "" for a code of that account. |