> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize salesforce sandbox with data

> Initialize the sandbox with salesforce-specific data following the defined schema.



## OpenAPI

````yaml post /sandbox/salesforce/{sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /sandbox/salesforce/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize salesforce sandbox with data
      description: >-
        Initialize the sandbox with salesforce-specific data following the
        defined schema.
      operationId: initialize_sandbox_sandbox_salesforce__sandbox_id__initialize_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The unique sandbox identifier
            title: Sandbox Id
          description: The unique sandbox identifier
        - name: init_default_data
          in: query
          required: false
          schema:
            type: boolean
            description: If true, use default test data for initialization
            default: false
            title: Init Default Data
          description: If true, use default test data for initialization
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SalesforceData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  accounts:
                    - name: Acme Corporation
                      industry: Technology
                      type: Customer
                      phone: +1-555-0100
                      website: https://www.acmecorp.com
                      revenue: 5000000
                      employees: 250
                      address:
                        street: 123 Tech Street
                        city: San Francisco
                        state: California
                        postal_code: '94105'
                        country: United States
                      description: Leading technology solutions provider
                      rating: Hot
                    - name: Global Enterprises Inc
                      industry: Finance
                      type: Prospect
                      phone: +1-555-0200
                      website: https://www.globalenterprises.com
                      revenue: 15000000
                      employees: 500
                      address:
                        street: 456 Finance Ave
                        city: New York
                        state: New York
                        postal_code: '10001'
                        country: United States
                      description: International financial services company
                      rating: Warm
                    - name: Tech Solutions Ltd
                      industry: Technology
                      type: Partner
                      phone: +1-555-0300
                      website: https://www.techsolutions.com
                      revenue: 3000000
                      employees: 150
                      address:
                        street: 789 Innovation Blvd
                        city: Austin
                        state: Texas
                        postal_code: '78701'
                        country: United States
                      description: Custom software development partner
                      rating: Hot
                  contacts:
                    - first_name: John
                      last_name: Doe
                      email: john.doe@acmecorp.com
                      phone: +1-555-0101
                      mobile: +1-555-0102
                      title: VP of Technology
                      department: IT
                      address:
                        street: 123 Tech Street
                        city: San Francisco
                        state: California
                        postal_code: '94105'
                        country: United States
                      description: Key decision maker for technology purchases
                      source: Web
                    - first_name: Jane
                      last_name: Smith
                      email: jane.smith@globalenterprises.com
                      phone: +1-555-0201
                      mobile: +1-555-0202
                      title: Chief Financial Officer
                      department: Finance
                      address:
                        street: 456 Finance Ave
                        city: New York
                        state: New York
                        postal_code: '10001'
                        country: United States
                      description: Budget approver and executive sponsor
                      source: Phone Inquiry
                    - first_name: Bob
                      last_name: Johnson
                      email: bob.johnson@techsolutions.com
                      phone: +1-555-0301
                      mobile: +1-555-0302
                      title: Director of Operations
                      department: Operations
                      address:
                        street: 789 Innovation Blvd
                        city: Austin
                        state: Texas
                        postal_code: '78701'
                        country: United States
                      description: Partnership coordinator and technical lead
                      source: Partner Referral
                    - first_name: Alice
                      last_name: Williams
                      email: alice.williams@acmecorp.com
                      phone: +1-555-0103
                      title: Product Manager
                      department: Product
                      source: Web
                    - first_name: Charlie
                      last_name: Brown
                      email: charlie.brown@globalenterprises.com
                      phone: +1-555-0203
                      title: IT Manager
                      department: IT
                      source: Trade Show
                  leads:
                    - first_name: David
                      last_name: Martinez
                      company: Startup Innovations Inc
                      email: david.martinez@startupinnovations.com
                      phone: +1-555-0400
                      mobile: +1-555-0401
                      title: Founder & CEO
                      status: Open - Not Contacted
                      source: Web
                      industry: Technology
                      rating: Hot
                      address:
                        street: 321 Startup Lane
                        city: Seattle
                        state: Washington
                        postal_code: '98101'
                        country: United States
                      website: https://www.startupinnovations.com
                      employees: 25
                      revenue: 500000
                      description: Fast-growing startup looking for enterprise solutions
                    - first_name: Emma
                      last_name: Garcia
                      company: Healthcare Systems LLC
                      email: emma.garcia@healthcaresystems.com
                      phone: +1-555-0500
                      title: Director of IT
                      status: Working - Contacted
                      source: Phone Inquiry
                      industry: Healthcare
                      rating: Warm
                      address:
                        city: Boston
                        state: Massachusetts
                        country: United States
                      employees: 300
                      description: Exploring new healthcare IT solutions
                    - first_name: Frank
                      last_name: Wilson
                      company: Manufacturing Corp
                      email: frank.wilson@manufacturingcorp.com
                      phone: +1-555-0600
                      title: Operations Manager
                      status: Open - Not Contacted
                      source: Partner Referral
                      industry: Manufacturing
                      rating: Warm
                      address:
                        city: Detroit
                        state: Michigan
                        country: United States
                      description: Interested in automation solutions
                  opportunities:
                    - name: Acme Corp - Q4 Enterprise Deal
                      stage: Qualification
                      close_date: '2025-12-31'
                      amount: 250000
                      probability: 75
                      type: New Business
                      source: Web
                      next_step: Schedule executive demo
                      description: Large enterprise deal for full platform implementation
                    - name: Global Enterprises - Annual Subscription
                      stage: Proposal/Price Quote
                      close_date: '2026-02-28'
                      amount: 500000
                      probability: 50
                      type: New Business
                      source: Phone Inquiry
                      next_step: Present pricing proposal to CFO
                      description: Multi-year subscription for financial services platform
                    - name: Tech Solutions - Partnership Expansion
                      stage: Negotiation/Review
                      close_date: '2025-12-07'
                      amount: 150000
                      probability: 80
                      type: Existing Business
                      source: Partner Referral
                      next_step: Finalize contract terms
                      description: Expanding existing partnership agreement
                    - name: Acme Corp - Additional Licenses
                      stage: Prospecting
                      close_date: '2026-02-28'
                      amount: 75000
                      probability: 60
                      type: Existing Business
                      source: Web
                      next_step: Identify additional use cases
                      description: Upsell opportunity for additional user licenses
                  cases:
                    - subject: Login Issues - Urgent
                      status: New
                      priority: High
                      origin: Phone
                      type: Problem
                      description: >-
                        Customer reporting intermittent login failures affecting
                        multiple users
                      customer_email: support@acmecorp.com
                      customer_name: John Doe
                      customer_phone: +1-555-0101
                    - subject: Feature Request - Custom Reporting
                      status: Working
                      priority: Medium
                      origin: Email
                      type: Feature Request
                      reason: Enhancement
                      description: >-
                        Customer requesting custom reporting capabilities for
                        executive dashboard
                    - subject: API Integration Question
                      status: New
                      priority: Low
                      origin: Web
                      type: Question
                      description: Developer needs clarification on API authentication flow
                      customer_email: developer@techsolutions.com
                    - subject: Performance Degradation
                      status: Escalated
                      priority: High
                      origin: Phone
                      type: Problem
                      description: >-
                        System response times have increased significantly
                        during peak hours
                    - subject: Training Request
                      status: New
                      priority: Medium
                      origin: Email
                      type: Question
                      description: New admin team needs comprehensive platform training
                  campaigns:
                    - name: Q4 2024 Product Launch
                      type: Email
                      status: In Progress
                      start_date: '2024-10-01'
                      end_date: '2024-12-31'
                      expected_revenue: 1000000
                      budget: 50000
                      actual_cost: 25000
                      description: >-
                        Major product launch campaign targeting enterprise
                        customers
                      active: true
                    - name: Partner Webinar Series
                      type: Webinar
                      status: Planned
                      start_date: '2025-01-15'
                      end_date: '2025-03-31'
                      expected_revenue: 250000
                      budget: 15000
                      description: Educational webinar series for partner network
                      active: false
                    - name: Industry Conference 2024
                      type: Conference
                      status: Completed
                      start_date: '2024-09-15'
                      end_date: '2024-09-17'
                      expected_revenue: 500000
                      budget: 75000
                      actual_cost: 80000
                      description: >-
                        Annual industry conference with booth and speaking
                        sessions
                      active: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SalesforceData-Input:
      properties:
        accounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Account'
              type: array
            - type: 'null'
          title: Accounts
        contacts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Contact'
              type: array
            - type: 'null'
          title: Contacts
        opportunities:
          anyOf:
            - items:
                $ref: '#/components/schemas/Opportunity'
              type: array
            - type: 'null'
          title: Opportunities
        leads:
          anyOf:
            - items:
                $ref: '#/components/schemas/Lead'
              type: array
            - type: 'null'
          title: Leads
        cases:
          anyOf:
            - items:
                $ref: '#/components/schemas/Case'
              type: array
            - type: 'null'
          title: Cases
        campaigns:
          anyOf:
            - items:
                $ref: '#/components/schemas/Campaign'
              type: array
            - type: 'null'
          title: Campaigns
      type: object
      title: SalesforceData
      description: Complete Salesforce sandbox data
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Account:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Company name
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
          description: e.g., Technology, Healthcare, Finance
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: e.g., Customer, Prospect, Partner
        phone:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Phone
        website:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Website
        revenue:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Revenue
          description: Annual revenue
        employees:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Employees
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
        rating:
          anyOf:
            - type: string
            - type: 'null'
          title: Rating
          description: e.g., Hot, Warm, Cold
      type: object
      required:
        - name
      title: Account
      description: Company/organization record
    Contact:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: First Name
        last_name:
          type: string
          maxLength: 80
          minLength: 1
          title: Last Name
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
        phone:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Phone
        mobile:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Mobile
        title:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Title
          description: Job title
        department:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Department
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Id
          description: Related account ID
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: e.g., Web, Phone, Referral
      type: object
      required:
        - last_name
      title: Contact
      description: Individual person associated with an account
    Opportunity:
      properties:
        name:
          type: string
          maxLength: 120
          minLength: 1
          title: Name
        stage:
          type: string
          title: Stage
          description: e.g., Prospecting, Qualification, Closed Won
        close_date:
          type: string
          title: Close Date
          description: Expected close date (YYYY-MM-DD)
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Amount
        probability:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Probability
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Id
          description: Related account ID
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: e.g., New Business, Renewal
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: Lead source
        next_step:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Next Step
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
      type: object
      required:
        - name
        - stage
        - close_date
      title: Opportunity
      description: Sales deal/potential revenue
    Lead:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: First Name
        last_name:
          type: string
          maxLength: 80
          minLength: 1
          title: Last Name
        company:
          type: string
          maxLength: 255
          minLength: 1
          title: Company
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
        phone:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Phone
        mobile:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Mobile
        title:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Title
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: Open - Not Contacted
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: e.g., Web, Phone, Referral
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        rating:
          anyOf:
            - type: string
            - type: 'null'
          title: Rating
          description: e.g., Hot, Warm, Cold
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        website:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Website
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
        employees:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Employees
        revenue:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Revenue
      type: object
      required:
        - last_name
        - company
      title: Lead
      description: Potential customer not yet qualified
    Case:
      properties:
        subject:
          type: string
          maxLength: 255
          minLength: 1
          title: Subject
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: New
        priority:
          anyOf:
            - type: string
            - type: 'null'
          title: Priority
          description: High, Medium, or Low
          default: Medium
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
          description: e.g., Phone, Email, Web
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: e.g., Problem, Question, Feature Request
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Id
        contact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Id
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
        customer_email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Customer Email
        customer_name:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Customer Name
        customer_phone:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Customer Phone
      type: object
      required:
        - subject
      title: Case
      description: Customer support ticket
    Campaign:
      properties:
        name:
          type: string
          maxLength: 80
          minLength: 1
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: e.g., Email, Webinar, Conference
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: Planned
        start_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Date
          description: YYYY-MM-DD
        end_date:
          anyOf:
            - type: string
            - type: 'null'
          title: End Date
          description: YYYY-MM-DD
        expected_revenue:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Expected Revenue
        budget:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Budget
        actual_cost:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Actual Cost
        description:
          anyOf:
            - type: string
              maxLength: 32000
            - type: 'null'
          title: Description
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
      type: object
      required:
        - name
      title: Campaign
      description: Marketing campaign
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Address:
      properties:
        street:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Street
        city:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: State
        postal_code:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Postal Code
        country:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Country
      type: object
      title: Address
      description: Reusable address structure
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````