Agents
Create or update a custom tool
Register a custom tool. Idempotent upsert on (org, name): if your org already has a tool with this name, it is updated in place (HTTP 200, no duplicate, hmac_secret preserved), so re-syncing the same tool from a multi-tenant deploy is safe; otherwise a new tool is created (HTTP 201, hmac_secret returned once). A prebuilt/global tool of the same name never blocks creating your org's tool. In server mode PyAI calls your webhook_url (signed, network-isolated), works on phone calls; client mode runs on the WebSocket. Requires the omni:session scope.
post/v1/tools
Request
- Base URL: https://api.pyai.com
- URL: https://api.pyai.com/v1/tools
- Auth: one of:
- HTTP bearer
- API key in header x-api-key
Request body
Response
Updated existing tool (idempotent upsert by name)
Example response
{
"object": "tool"
}Changes
No recorded changes to this operation across all 1 revision of this API.