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": "<string>",
      "status_label": "<string>",
      "contacts": [
        {
          "name": "<string>",
          "emails": [
            {}
          ],
          "phones": [
            {}
          ]
        }
      ],
      "opportunities": [
        {
          "note": "<string>",
          "value": 123,
          "confidence": 123,
          "value_period": "<string>"
        }
      ],
      "tasks": [
        {
          "text": "<string>",
          "date": "<string>",
          "is_complete": true,
          "assigned_to": "<string>"
        }
      ]
    }
  ]
}
'
{
  "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

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
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type