Create tool
curl --request POST \
--url https://api.goyappr.com/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "capture_lead",
"config": {},
"description": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://api.goyappr.com/tools"
payload = {
"name": "capture_lead",
"config": {},
"description": "<string>",
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'capture_lead',
config: {},
description: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://api.goyappr.com/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'capture_lead',
'config' => [
],
'description' => '<string>',
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/tools"
payload := strings.NewReader("{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "webhook",
"config": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Tools
Create Tool
Tool names are automatically normalized to camelCase (e.g. capture_lead → captureLead). Top-level extraction_parameters, static_parameters, and include_standard_metadata are automatically migrated into payload_config if provided outside it.
POST
/
tools
Create tool
curl --request POST \
--url https://api.goyappr.com/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "capture_lead",
"config": {},
"description": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://api.goyappr.com/tools"
payload = {
"name": "capture_lead",
"config": {},
"description": "<string>",
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'capture_lead',
config: {},
description: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://api.goyappr.com/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'capture_lead',
'config' => [
],
'description' => '<string>',
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/tools"
payload := strings.NewReader("{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"capture_lead\",\n \"config\": {},\n \"description\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "webhook",
"config": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Webhook tools use one canonical configuration across prompt agents, flow agents, and tests:
- For webhook tools,
descriptionis required because it tells the model when the tool is appropriate. config.urlmust 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.methodsupportsGET,POST,PUT,PATCH, andDELETE;timeout_secondsis 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, andUpgradeare rejected. Authorization and custom content types remain supported. - Payload parameter names are normalized to camelCase. Extraction descriptions are required, and
requireddefaults totruewhen omitted. - Webhook tools are dispatched once.
retry_countis unsupported because automatically replaying an action could duplicate a non-idempotent operation.
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.
Body
application/json
Example:
"capture_lead"
Available options:
webhook, function Webhook configuration is validated as described below; function-tool configuration is stored as an arbitrary JSON object.
Required and non-empty when type is webhook; optional for function tools.