1. Draft
AgenticUniverse - Previously Formi
  • Our Technical Note
    • Why Open AI is not Enough
    • How business Outcomes would Change Radically with AgenticUniverse
    • Our Research
      • STT - Nuances and Insights
      • Solving for STT Constraints
  • Generate Token
    • Login/Generate Token
      POST
  • Agent Configuration
    • Model Configuration
      • Configuration Helpers
        • Supported Providers
        • Supported Models
        • Supported Parameters
      • Get Model Configuration
      • Set Model Configuration
    • State Machine
      • Edge
        • Legacy
          • Create Edge
          • Edge Details
          • Update Edge
          • Delete Edge
        • Update edge properties
        • Get edge details
        • Delete an edge
        • Create an edge (transition) between two states
      • State
        • Create State from Template
        • Get State Information
        • Update State
        • Delete State
      • Get State Machine Structure
    • Prompt Templates
      • Get All Templates
      • Render Template
    • Tools
      • Get Tools List
      • Add Tool
      • Update Tool
      • Delete Tool
    • Draft
      • Create or replace draft
        POST
      • Get current draft
        GET
      • Discard draft
        DELETE
      • Merge changes into draft
        PATCH
    • Publish
      • Publish draft
    • Versions
      • List published versions
      • Get version detail
    • Revert
      • Revert to archived version
    • Get All Agents
      GET
    • Single Agent Details
      GET
    • Create Agent
      POST
    • Update Agent Details
      PUT
    • Enable Dashboard For An Outlet
      POST
    • Disable Dashboard For An Outlet
      POST
    • Get Call queue Sheet ID
      GET
  • Interactions
    • Pre-Interaction Context
      • Schedule an Interaction
      • Update an Interaction Id
      • Delete an Interaction Id
      • Clear all interactions
      • Get Summarized Interaction Info
    • Interaction Modalities
      • Video
        • Generation
          • Generate Welcome Video
      • Text
        • Start Interaction
        • Create Response
        • End Interaction
      • Voice
        • Connection Configuration
          • Quickstart
          • Connecting Twilio
          • Connecting Exotel
          • Formi WebSocket Configuration Guide
          • Create a New Connection Vendor
          • Get All Connection Vendors
          • Update a Connection Vendor
          • Delete a Connection Vendor
          • Get Agent's Connection Config
          • Add or Update Agent's Connection Config
    • Post Interaction Configuration
      • Email Destination Configuration
      • Variables CRUD
        • Get all required variables for the outlet with map
        • Modify variable definition for outlet
        • Add a new variable for the outlet
        • DELETE variable for outlet
        • Connect Variable to a destination
      • Destinations CRUD
        • Get all destinations for the outlet
        • Modify Destination for outlet
        • Add a new Destination for the outlet
        • DELETE Destinations for outlet
      • Post Call Email Configuration
        • Check Email Configuration
        • Set Email Configuration
    • Signals
      • Get Signals List
      • Add Signal - LEAD
      • Add Signal - INTERACTION
      • Update Signal
    • Get Interaction Summary
      GET
    • Resolve an Escalated Interaction
      POST
    • Get the Interaction list
      GET
    • Get Information regarding Single Interaction
      GET
    • End Interaction
      POST
  • Agent Utilisation
    • Get Credits Available
    • Interaction Utilisation
    • Model Utilisation
  • Webhooks
    • Get webhook URL
    • Update webhook URL
    • Get webhook metadata
    • Modify webhook metadata
    • Get reservation ingestion metadata
  • Reachout Mechanism
    • Campaign Management
      • Campaigns List
      • Campaign Details
      • Create Campaign
      • Batch Schedule Interaction for Leads
      • Quick Schedule
      • Single Campaign Report
    • Lead Management
      • Upload Leads
      • Upload Leads - Status
      • Get Leads List
  • Untitled Endpoint
    GET
  • Add Signal
    POST
  • Schemas
    • Schemas
      • Schemas
        • CreateEdgeWithTemplateDTO
        • UpdateEdgeWithTemplateDTO
        • EdgeDetails
      • WebhookUrlRequest
      • InteractionSummaryCard
      • InteractionInfo
      • CreateVendorPayload
      • WebhookMetadataRequest
      • InteractionSummaryPayload
      • CustomerDetails
      • Vendor
      • SuccessResponse
      • InteractionSummaryResponse
      • InteractionDetails
      • ConnectionConfig
      • ErrorResponse
      • GenericSuccessResponse
      • SuccessResponseVendorList
      • SuccessResponseSingleVendor
      • SuccessResponseAgentConfig
    • Response
      • Unauthorized
      • NotFound
      • ServerError
    • Add Calls Payload
    • APISuccess
    • APIError
    • APIErrorWithPayload
    • EdgeSnapshot
    • StateSnapshot
    • StateMachineSnapshot
    • ConfigSnapshot
    • ChangeSummary
    • DraftResponse
    • VersionSummary
    • VersionDetail
    • StateMachinePatch
  1. Draft

Merge changes into draft

Staging Env
https://staging-api.formi.co.in
Staging Env
https://staging-api.formi.co.in
PATCH
https://staging-api.formi.co.in
/v2/agents/{agent_id}/config/model/draft
Last modified:2026-05-01 13:30:51
Maintainer:Not configured
Partially updates the draft by merging supplied fields into the existing snapshot. Fields not included in the request are preserved unchanged.
If no draft exists yet, one is auto-created from the current live state before applying the patch.
Merge rules:
agent_name / main_prompt: replaced entirely if provided.
agent_configuration: deep-merged (nested keys are merged, not replaced).
state_machine: structured patch — upsert states/edges by id, delete by id list.

Request

Authorization
API Key
Add parameter in header
token
Example:
token: ********************
or
Path Params

Body Params application/jsonRequired

Example
{
    "agent_name": "Formi Sales Bot v2",
    "main_prompt": "Updated system prompt here.",
    "agent_configuration": {
        "LLM": {
            "conversation_llm": {
                "model_name": "gpt-4o"
            }
        }
    },
    "state_machine": {
        "states": [
            {
                "state_id": 10,
                "name": "greeting_state",
                "template_id": 3,
                "state_prompt": "",
                "variables": {
                    "tone": "friendly"
                }
            }
        ],
        "edges": [
            {
                "edge_id": 42,
                "from_node": 10,
                "to_node": 11,
                "prompt": "If the user says goodbye, transition.",
                "transition_metadata": {}
            }
        ],
        "deleted_state_ids": [
            99
        ],
        "deleted_edge_ids": [
            55
        ]
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://staging-api.formi.co.in/v2/agents//config/model/draft' \
--header 'token: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "agent_name": "Formi Sales Bot v2",
    "main_prompt": "Updated system prompt here.",
    "agent_configuration": {
        "LLM": {
            "conversation_llm": {
                "model_name": "gpt-4o"
            }
        }
    },
    "state_machine": {
        "states": [
            {
                "state_id": 10,
                "name": "greeting_state",
                "template_id": 3,
                "state_prompt": "",
                "variables": {
                    "tone": "friendly"
                }
            }
        ],
        "edges": [
            {
                "edge_id": 42,
                "from_node": 10,
                "to_node": 11,
                "prompt": "If the user says goodbye, transition.",
                "transition_metadata": {}
            }
        ],
        "deleted_state_ids": [
            99
        ],
        "deleted_edge_ids": [
            55
        ]
    }
}'

Responses

🟢200
application/json
Draft merged successfully.
Body

Example
{
    "success": true,
    "message": "Draft merged",
    "payload": {
        "draft_id": 17,
        "agent_id": 5,
        "status": "draft",
        "config_snapshot": {
            "agent_name": "Formi Sales Bot",
            "main_prompt": "You are a helpful sales assistant...",
            "agent_configuration": {
                "LLM": {
                    "conversation_llm": {
                        "model_name": "gpt-4o",
                        "temperature": 0.7
                    }
                },
                "TTS": {
                    "provider": "elevenlabs",
                    "voice_id": "abc123"
                },
                "STT": {
                    "provider": "deepgram",
                    "language": "en-IN"
                },
                "welcome_message": "Hello! How can I help you today?"
            },
            "state_machine": {
                "states": [
                    {
                        "state_id": 10,
                        "name": "greeting_state",
                        "template_id": 3,
                        "state_prompt": "",
                        "variables": {
                            "tone": "friendly"
                        }
                    }
                ],
                "edges": [
                    {
                        "edge_id": 42,
                        "from_node": 10,
                        "to_node": 11,
                        "prompt": "If the user says goodbye, transition.",
                        "transition_metadata": {}
                    }
                ]
            },
            "connection_config": {}
        },
        "created_at": "2026-05-01T10:30:00+05:30"
    }
}
🟠400
🟠409
Modified at 2026-05-01 13:30:51
Previous
Discard draft
Next
Publish draft
Built with