Skip to main content
POST
/
sandbox
/
close
/
{sandbox_id}
/
initialize
Initialize close sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/close/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "leads": [
    {
      "name": "CloudScale Technologies Inc.",
      "status": "Potential",
      "contacts": [
        {
          "name": "Sarah Mitchell",
          "emails": [
            {
              "email": "sarah.mitchell@cloudscale.tech",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        },
        {
          "name": "David Thompson",
          "emails": [
            {
              "email": "dthompson@cloudscale.tech",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        }
      ],
      "opportunities": [
        {
          "note": "Annual SaaS subscription renewal - CloudScale Technologies",
          "value": 48000,
          "confidence": 85,
          "period": "annual"
        },
        {
          "note": "Cloud infrastructure migration - CloudScale expansion",
          "value": 180000,
          "confidence": 55,
          "period": "one_time"
        }
      ],
      "tasks": [
        {
          "description": "Send proposal document to Sarah Mitchell at CloudScale",
          "date": "2025-12-02",
          "completed": false
        },
        {
          "description": "Connect with decision maker David Thompson regarding budget approval",
          "date": "2025-12-03",
          "completed": false
        },
        {
          "description": "Submit quarterly business review deck to CloudScale Technologies",
          "date": "2025-12-09",
          "completed": false
        }
      ]
    },
    {
      "name": "DataFlow Analytics Corp",
      "status": "Potential",
      "contacts": [
        {
          "name": "Michael Chen",
          "emails": [
            {
              "email": "m.chen@dataflowanalytics.com",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        },
        {
          "name": "Jennifer Martinez",
          "emails": [
            {
              "email": "jen.martinez@dataflowanalytics.com",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        }
      ],
      "opportunities": [
        {
          "note": "Enterprise data analytics platform implementation for DataFlow",
          "value": 125000,
          "confidence": 60,
          "period": "one_time"
        }
      ],
      "tasks": [
        {
          "description": "Schedule technical demo call with DataFlow Analytics team",
          "date": "2025-12-03",
          "completed": false
        },
        {
          "description": "Send case studies and customer references to Michael Chen",
          "date": "2025-12-08",
          "completed": false
        },
        {
          "description": "Follow up on security compliance questions from Jennifer Martinez",
          "date": "2025-12-06",
          "completed": false
        }
      ]
    },
    {
      "name": "Phoenix Digital Marketing Agency",
      "status": "Potential",
      "contacts": [
        {
          "name": "Emily Rodriguez",
          "emails": [
            {
              "email": "emily.r@phoenixdigital.io",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        },
        {
          "name": "Robert Chang",
          "emails": [
            {
              "email": "rchang@phoenixdigital.io",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        }
      ],
      "opportunities": [
        {
          "note": "Digital transformation consulting package - Phoenix Digital",
          "value": 75000,
          "confidence": 70,
          "period": "one_time"
        },
        {
          "note": "Marketing automation platform upgrade - Phoenix Digital",
          "value": 28000,
          "confidence": 90,
          "period": "monthly"
        }
      ],
      "tasks": [
        {
          "description": "Follow up on pricing questions from Emily Rodriguez",
          "date": "2025-12-02",
          "completed": false
        },
        {
          "description": "Schedule onboarding kickoff meeting with Phoenix Digital",
          "date": "2025-12-10",
          "completed": false
        }
      ]
    },
    {
      "name": "Vertex Manufacturing Solutions",
      "status": "Potential",
      "contacts": [
        {
          "name": "James Patterson",
          "emails": [
            {
              "email": "j.patterson@vertexmfg.com",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        }
      ],
      "opportunities": [
        {
          "note": "ERP system integration and training - Vertex Manufacturing",
          "value": 95000,
          "confidence": 45,
          "period": "one_time"
        }
      ],
      "tasks": [
        {
          "description": "Review and finalize contract terms with Vertex Manufacturing legal",
          "date": "2025-12-05",
          "completed": false
        }
      ]
    },
    {
      "name": "Lighthouse Financial Advisors",
      "status": "Potential",
      "contacts": [
        {
          "name": "Alexandra Kim",
          "emails": [
            {
              "email": "alex.kim@lighthousefa.com",
              "type": "office",
              "is_unsubscribed": false
            }
          ]
        }
      ],
      "opportunities": [
        {
          "note": "Financial planning software suite - Lighthouse FA",
          "value": 32000,
          "confidence": 80,
          "period": "annual"
        }
      ],
      "tasks": [
        {
          "description": "Prepare ROI analysis for Lighthouse Financial Advisors",
          "date": "2025-12-04",
          "completed": false
        }
      ]
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete Close sandbox data structure.

Nested hierarchy for initialization:

  • Leads contain Contacts, Opportunities, and Tasks
leads
CloseLead · object[] | null

List of leads with nested objects

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type