Create new version of agent
Create a new version of an existing agent definition by providing updated agent properties and a commit message.
Create new version of agent
Create a new version of an existing agent definition by providing updated agent properties and a commit message.
POST
https://api.futureagi.com/simulate/agent-definitions/{agent_id}/versions/create/
Bearer
agent_id *
Click "Try It" to send a request
Authentication
This endpoint requires authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | A UUID string identifying the agent definition. |
Request Body
- agent_type: string (one of: voice, text) Type of the agent.
- agent_name: string Name of the agent.
- provider: string Provider for the agent (e.g., vapi, retell).
- api_key: string API key for the agent provider.
- assistant_id: string External identifier for the assistant.
- description: string New description for the agent.
- language: string Language of the agent (ISO 639-1 code). For example, en for English.
- knowledge_base: string ID of the knowledge base to associate with the agent.
- contact_number: string Contact number for the agent including country code. For example, +1xxxxxxxxxx for USA, +91xxxxxxxxxx for India, etc.
- inbound: boolean Specifies if the agent handles inbound communication.
- commit_message: string Commit message for this new version.
- observability_enabled: boolean Enable or disable observability for the agent.
Example
{
"agent_type": "voice",
"agent_name": "your-agent_name",
"provider": "your-provider",
"api_key": "your-api_key",
"assistant_id": "your-assistant_id",
"description": "your-description",
"language": "your-language",
"knowledge_base": "your-knowledge_base",
"contact_number": "your-contact_number",
"inbound": true,
"commit_message": "your-commit_message",
"observability_enabled": true
}
Responses
201
Agent version created successfully.
- message: string
Example:
Agent version created successfully - version: any
400
Invalid data for agent update.
401
Authentication credentials were not provided.
404
Agent definition not found.
500
Internal server error.
Code Examples
cURL
curl -X POST "https://api.futureagi.com/simulate/agent-definitions/{agent_id}/versions/create/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_type": "voice", "agent_name": "your-agent_name", "provider": "your-provider", "api_key": "your-api_key", "assistant_id": "your-assistant_id", "description": "your-description", "language": "your-language", "knowledge_base": "your-knowledge_base", "contact_number": "your-contact_number", "inbound": true, "commit_message": "your-commit_message", "observability_enabled": true}'
Python
import requests
url = "https://api.futureagi.com/simulate/agent-definitions/{agent_id}/versions/create/"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"agent_type": "voice",
"agent_name": "your-agent_name",
"provider": "your-provider",
"api_key": "your-api_key",
"assistant_id": "your-assistant_id",
"description": "your-description",
"language": "your-language",
"knowledge_base": "your-knowledge_base",
"contact_number": "your-contact_number",
"inbound": true,
"commit_message": "your-commit_message",
"observability_enabled": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
JavaScript
const response = await fetch("https://api.futureagi.com/simulate/agent-definitions/{agent_id}/versions/create/", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"agent_type": "voice",
"agent_name": "your-agent_name",
"provider": "your-provider",
"api_key": "your-api_key",
"assistant_id": "your-assistant_id",
"description": "your-description",
"language": "your-language",
"knowledge_base": "your-knowledge_base",
"contact_number": "your-contact_number",
"inbound": true,
"commit_message": "your-commit_message",
"observability_enabled": true
})
});
const data = await response.json();
console.log(data); Was this page helpful?