Skip to main content
POST
Test API Tool
An API tool lets a goal bot call your endpoint mid-conversation — check stock, look up an order, fetch a balance — and use the answer in its reply. Attach a tool to a bot by putting its _id in that bot’s allowedToolIds.
Runs the tool for real against your endpoint and returns both the raw response and the value responseMapping pulled out of it. Use it to confirm the mapping before a bot depends on it.
This makes a real call to your URL. If the tool is a POST that creates something, it will create it.

Authentication

Pass your workspace API key as a Bearer token, or use a Clerk session token.

Request body

string
required
The tool _id from GET /api/campaign-tools. Missing or malformed returns 400 Valid toolId required.
string
Optional. Run the tool with a real lead’s data interpolated into the URL and body, so you see exactly what a live conversation would send. An unknown or malformed id is ignored and the tool runs with empty lead data.

Example

Success (200 OK)

Response

any
What responseMapping resolved to. If this is null or missing, the mapping does not match your response shape — fix it with save-tool before attaching the tool to a bot.
any
The full response your endpoint returned.
string | null
The lead whose data was interpolated, or null when none was used.

Errors