curl --request PATCH \
--url 'https://response.stateset.com/api/v1/functions/{id}' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [
{
"name": "string",
"type": "string",
"description": "string",
"required": true
}
],
"headers": {},
"timeout": 1
}'
{
"object": "string",
"id": "string",
"name": null,
"endpoint": null,
"method": null,
"description": null,
"activated": true,
"agent_id": null
}
Update a tool; activated:false retires it
The tool
PATCH
/
api
/
v1
/
functions
/
{id}
curl --request PATCH \
--url 'https://response.stateset.com/api/v1/functions/{id}' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [
{
"name": "string",
"type": "string",
"description": "string",
"required": true
}
],
"headers": {},
"timeout": 1
}'
{
"object": "string",
"id": "string",
"name": null,
"endpoint": null,
"method": null,
"description": null,
"activated": true,
"agent_id": null
}
Path parameters
string (uuid)
required
The tool id.
Request body
UpdateFunction
string
string
string
string
boolean
Set false to retire the tool.
object[]
object
integer
Response
Function
string
string
string,null
string,null
string,null
string,null
boolean
string,null
Status codes
| Code | Meaning |
|---|---|
200 | The tool |
400 | Invalid request. issues names the offending field(s). |
401 | Missing, invalid, or expired API key. |
403 | The key lacks a required scope. |
404 | Not found, or not in the organization that owns the key. |
429 | Rate limit exceeded. |
Access
| Required scope | agents:write |
| Rate limit | 30 requests per minute |
curl --request PATCH \
--url 'https://response.stateset.com/api/v1/functions/{id}' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [
{
"name": "string",
"type": "string",
"description": "string",
"required": true
}
],
"headers": {},
"timeout": 1
}'
{
"object": "string",
"id": "string",
"name": null,
"endpoint": null,
"method": null,
"description": null,
"activated": true,
"agent_id": null
}