Made in 10Docs
GuidesAPI
ReferenceTools

Rotate a tool's secret

Makes a new signing secret.

POST
/tools/{tool_id}/rotate

Authorization

secretKey
headerAuthorizationBearer <sk_live_… or sk_test_… (a prefix and 40 base62 characters)>

A secret key from the dashboard, sent as Authorization: Bearer sk_live_…. Live keys run real, charged calls; test keys (sk_test_…) run calls of at most 60 seconds, 20 a day per organization, never charged. Each key sees only its own env's calls, meetings, webhooks, memories and analytics. Publishable keys (pk_…) are refused.

Path Parameters

tool_id*string

The tool's id.

Match^tool_[0-9A-Za-z]{20}$
Example"tool_6Mx1Rb8QwT3kNv5LcZ9p"

Request Body

application/json
  1. body
Example
{  "grace_seconds": 3600}
grace_seconds?integer

How long the old secret also signs. 0 stops it at once.

Range0 <= value <= 604800
Default86400

Response Body

The tool and its new secret.

application/json
  1. response
tool*

A tool (never its secret).

Example
{  "id": "tool_6Mx1Rb8QwT3kNv5LcZ9p",  "name": "order_status",  "description": "Looks up an order's status by its number.",  "parameters": {    "type": "object",    "properties": {      "order": {        "type": "string"      }    },    "required": [      "order"    ]  },  "runs_on": "server",  "url": "https://example.com/hooks/order-status",  "timeout_ms": 5000,  "filler": "One moment while I check.",  "enabled": true,  "character_ids": [    "chr_4fT9kQ2mXw7LbN3pZs8V"  ],  "previous_secret_until_unix": null,  "created_unix": 1793300000,  "updated_unix": 1793300000}
secret*|

The signing secret; null for a page tool, which has none.

Example Request
curl -X POST 'https://api.daxov.com/v1/tools/tool_6Mx1Rb8QwT3kNv5LcZ9p/rotate' \  -H 'Content-Type: application/json' \  -d '{  "grace_seconds": 3600}'
Example Response
{  "tool": {    "id": "tool_6Mx1Rb8QwT3kNv5LcZ9p",    "name": "order_status",    "description": "Looks up an order's status by its number.",    "parameters": {      "type": "object",      "properties": {        "order": {          "type": "string"        }      },      "required": [        "order"      ]    },    "runs_on": "server",    "url": "https://example.com/hooks/order-status",    "timeout_ms": 5000,    "filler": "One moment while I check.",    "enabled": true,    "character_ids": [      "chr_4fT9kQ2mXw7LbN3pZs8V"    ],    "previous_secret_until_unix": null,    "created_unix": 1793300000,    "updated_unix": 1793300000  },  "secret": "whsec_BwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSY="}