curl --silent --show-error --fail-with-body --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header "Authorization: Bearer $RESPONSECX_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"conditions": {
"any": [],
"all": []
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "https://example.com/webhooks/stateset",
"method": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"parameters": [
{
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"required": true
}
],
"headers": {},
"timeout": 1000
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1.5,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"agent_take_over_tag": "string"
}
}'
{
"object": "agent",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"goal": "string",
"role": "string",
"updated_at": "2026-08-31T14:22:05Z",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"settings": {
"object": "agent.settings",
"configured": true
}
}
Build a complete agent — rules, tools and settings — in one atomic call
Preferred over create + configure + add_rule + add_function. Pass template_id to seed a proven ruleset.
POST
/
api
/
v1
/
agents
/
provision
curl --silent --show-error --fail-with-body --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header "Authorization: Bearer $RESPONSECX_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"conditions": {
"any": [],
"all": []
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "https://example.com/webhooks/stateset",
"method": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"parameters": [
{
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"required": true
}
],
"headers": {},
"timeout": 1000
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1.5,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"agent_take_over_tag": "string"
}
}'
{
"object": "agent",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"goal": "string",
"role": "string",
"updated_at": "2026-08-31T14:22:05Z",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"settings": {
"object": "agent.settings",
"configured": true
}
}
Preferred over create + configure + add_rule + add_function. Pass template_id to seed a proven ruleset.
Headers
string
Optional client-generated key that makes the POST safe to retry: a repeat with the same key and body replays the original response instead of creating a duplicate.
Request body
ProvisionAgent
string
required
Minimum length:
1. Maximum length: 200.string
Seeds rules/attributes/examples from a starter template. Maximum length:
100.string
One of: assistant, customer_service, sales. Minimum length:
1. Maximum length: 100.string
Maximum length:
5000.string
The system prompt / persona. Maximum length:
50000.string
Maximum length:
2000.string
Maximum length:
2000.boolean
object[]
Maximum items:
50.Show rules
Show rules
string
required
Minimum length:
1. Maximum length: 200.string
required
One of: escalation, qualification, response, routing. Minimum length:
1. Maximum length: 100.string
Maximum length:
5000.boolean
object
any[]
[{type, …}]. Types: collect_fields, fallback, handoff, include_sources, require_context, require_source_for_claims, require_verification, response_pattern, tag. Maximum items:
100.object[]
Maximum items:
50.Show functions
Show functions
string
required
Minimum length:
1. Maximum length: 200.string
required
Public http(s) URL. Private and metadata addresses are rejected. Minimum length:
1. Maximum length: 2000.string
required
Minimum length:
1. Maximum length: 20.string
Maximum length:
5000.boolean
object[]
object
Additional keys map to values of type
string.integer
Minimum:
1000. Maximum: 300000.object
Model config. Defaults to the template’s when a template is used.
Show settings
Show settings
string
e.g. ‘gpt-4.1’, ‘claude-sonnet-5’. Maximum length:
200.string
e.g. ‘openai’, ‘anthropic’. Maximum length:
100.string
Maximum length:
100.number
Minimum:
0. Maximum: 2.integer
Minimum:
1. Maximum: 128000.number
Minimum:
0. Maximum: 1.string
Maximum length:
200.string
Maximum length:
200.string
Maximum length:
200.Response
Agent
string
Fixed value:
'agent'.string
string,null
string,null
string,null
boolean
string,null
string,null
string,null
string,null
Present on single-agent reads and writes only.
AgentSettingsOut
Status codes
| Code | Meaning |
|---|---|
201 | The provisioned agent, with a summary of what was created |
400 | Invalid request. issues names the offending field(s). |
401 | Missing, invalid, or expired API key. |
403 | The key lacks a required scope. |
409 | Conflict — either the creation ceiling was reached for this organization (agent_limit_reached), or a request with the same Idempotency-Key is still in flight (idempotency_in_progress); retry the latter after the first attempt settles. |
422 | The Idempotency-Key was already used with a DIFFERENT request body (idempotency_key_reused). Reuse a key only to retry the identical request. |
429 | Rate limit exceeded. |
Access
| Required scope | agents:write |
| Rate limit | 10 requests per minute |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header "Authorization: Bearer $RESPONSECX_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"conditions": {
"any": [],
"all": []
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "https://example.com/webhooks/stateset",
"method": "string",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"parameters": [
{
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"required": true
}
],
"headers": {},
"timeout": 1000
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1.5,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"agent_take_over_tag": "string"
}
}'
{
"object": "agent",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"type": "standard",
"description": "Two-person tent, green — replacement for damaged pole set.",
"activated": true,
"goal": "string",
"role": "string",
"updated_at": "2026-08-31T14:22:05Z",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"settings": {
"object": "agent.settings",
"configured": true
}
}
Last modified on September 21, 2026