Skip to main content
POST
Create tool
Webhook tools use one canonical configuration across prompt agents, flow agents, and tests:
  • For webhook tools, description is required because it tells the model when the tool is appropriate.
  • config.url must be a final public HTTP(S) endpoint. Local and non-public literal targets are rejected at save time; dispatch also rejects non-public or mixed DNS answers. Redirects are not followed.
  • config.method supports GET, POST, PUT, PATCH, and DELETE; timeout_seconds is 1–60 seconds and defaults to 30.
  • Request headers must have non-empty names and string values. Routing/framing headers such as Host, Content-Length, Transfer-Encoding, Connection, Expect, Keep-Alive, Proxy-*, TE, Trailer, and Upgrade are rejected. Authorization and custom content types remain supported.
  • Payload parameter names are normalized to camelCase. Extraction descriptions are required, and required defaults to true when omitted.
  • Webhook tools are dispatched once. retry_count is unsupported because automatically replaying an action could duplicate a non-idempotent operation.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.

Body

application/json
name
string
required
Example:

"capture_lead"

type
enum<string>
required
Available options:
webhook,
function
config
object
required

Webhook configuration is validated as described below; function-tool configuration is stored as an arbitrary JSON object.

description
string

Required and non-empty when type is webhook; optional for function tools.

idempotency_key
string

Response

201 - application/json

Tool created

id
string<uuid>
name
string

Normalized to camelCase (e.g. 'capture_lead' → 'captureLead')

description
string | null
type
enum<string>
Available options:
webhook,
function
config
object
is_active
boolean
created_at
string<date-time>
updated_at
string<date-time>