> ## 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 wordpress sandbox with data

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



## OpenAPI

````yaml post /sandbox/wordpress/{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/wordpress/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize wordpress sandbox with data
      description: >-
        Initialize the sandbox with wordpress-specific data following the
        defined schema.
      operationId: initialize_sandbox_sandbox_wordpress__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/WordPressData'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  posts:
                    - title: Welcome to Klavis AI WordPress Integration
                      content: >-
                        <p>This is the first test post created through Klavis
                        AI's WordPress sandbox.</p><p>We're testing the full
                        CRUD functionality with WordPress.com REST API
                        v1.1.</p><p>Key features being tested:</p><ul><li>Post
                        creation with multiple statuses</li><li>Categories and
                        tags management</li><li>Different post
                        formats</li><li>Content formatting with HTML</li></ul>
                      status: publish
                      summary: >-
                        Testing Klavis AI WordPress sandbox integration with
                        full CRUD support
                      categories:
                        - Technology
                        - Integration
                        - API
                      tags:
                        - klavis
                        - wordpress
                        - mcp
                        - testing
                        - rest-api
                      format: standard
                    - title: Understanding MCP (Model Context Protocol)
                      content: >-
                        <h2>What is MCP?</h2><p>The Model Context Protocol (MCP)
                        is a revolutionary approach to AI
                        integrations.</p><h3>Key
                        Benefits</h3><ul><li>Standardized integration
                        patterns</li><li>Secure authentication
                        flows</li><li>Sandbox testing environments</li><li>Rate
                        limiting and error handling</li></ul><blockquote>MCP
                        enables AI agents to reliably interact with 100+ tools
                        at scale.</blockquote>
                      status: publish
                      summary: >-
                        Learn about the Model Context Protocol and how it
                        revolutionizes AI integrations
                      categories:
                        - Technology
                        - Education
                      tags:
                        - mcp
                        - ai
                        - protocol
                        - integration
                      format: standard
                    - title: 'Draft Post: Future Features Roadmap'
                      content: >-
                        <p>This is a draft post about upcoming features in the
                        WordPress sandbox...</p><h3>Planned
                        Features</h3><ul><li><strong>Pages Support</strong>:
                        Create and manage WordPress pages</li><li><strong>Media
                        Management</strong>: Upload and attach featured
                        images</li><li><strong>Comments</strong>: Handle post
                        comments via API</li><li><strong>Custom Post
                        Types</strong>: Support for custom content
                        types</li><li><strong>Post Relationships</strong>:
                        Parent/child post hierarchies</li></ul><p>Stay tuned for
                        updates!</p>
                      status: draft
                      summary: >-
                        Planning future WordPress integration features and
                        enhancements
                      categories:
                        - Product Updates
                        - Roadmap
                      tags:
                        - roadmap
                        - features
                        - planning
                      format: standard
                    - title: 'Quick Note: Integration Best Practices'
                      content: >-
                        <p>A quick aside about best practices when integrating
                        with WordPress.com API:</p><ol><li>Always handle rate
                        limits gracefully</li><li>Use OAuth 2.0 for
                        authentication</li><li>Validate data before sending to
                        API</li><li>Normalize responses for
                        consistency</li></ol>
                      status: publish
                      summary: Best practices for WordPress API integration
                      categories:
                        - Documentation
                      tags:
                        - notes
                        - quick
                        - best-practices
                      format: aside
                    - title: 'Image Gallery: Integration Screenshots'
                      content: >-
                        <p>This post showcases screenshots of the integration
                        process.</p><p>[Gallery would go here with multiple
                        images showing the OAuth flow, sandbox dashboard, and
                        API responses]</p>
                      status: publish
                      summary: Visual guide to WordPress integration
                      categories:
                        - Documentation
                        - Visual
                      tags:
                        - gallery
                        - screenshots
                        - visual
                      format: gallery
                    - title: 'Link: WordPress REST API Documentation'
                      content: >-
                        <p>Check out the official WordPress.com REST API
                        documentation for more details:</p><p><a
                        href="https://developer.wordpress.com/docs/api/">https://developer.wordpress.com/docs/api/</a></p>
                      status: publish
                      categories:
                        - Resources
                      tags:
                        - link
                        - documentation
                        - reference
                      format: link
                    - title: Inspirational Quote
                      content: >-
                        <blockquote>"The best way to predict the future is to
                        implement it." - Klavis AI Team</blockquote><p>This
                        quote inspires our approach to building robust
                        integrations.</p>
                      status: publish
                      categories:
                        - Inspiration
                      tags:
                        - quote
                        - inspiration
                      format: quote
                    - title: Private Internal Note
                      content: >-
                        <p>This is a private post for internal team use
                        only.</p><p>Internal metrics:</p><ul><li>OAuth
                        completion rate: 98%</li><li>API success rate:
                        99.5%</li><li>Average response time: 250ms</li></ul>
                      status: private
                      summary: Internal metrics and notes
                      categories:
                        - Internal
                      tags:
                        - private
                        - metrics
                        - internal
                      format: standard
                    - title: Testing Categories and Tags
                      content: >-
                        <p>This post tests extensive categorization and tagging
                        capabilities.</p><p>WordPress allows multiple categories
                        and tags per post, which we're testing here.</p>
                      status: publish
                      summary: Testing multi-category and multi-tag support
                      categories:
                        - Testing
                        - Quality Assurance
                        - Automation
                        - CI/CD
                      tags:
                        - test
                        - qa
                        - automation
                        - categories
                        - tags
                        - metadata
                      format: standard
                    - title: 'Draft: Pending Review Article'
                      content: >-
                        <p>This article is pending editorial review before
                        publication.</p><p>It covers advanced topics in
                        WordPress automation and sandbox testing.</p>
                      status: pending
                      summary: Advanced WordPress automation topics - pending review
                      categories:
                        - Advanced
                      tags:
                        - pending
                        - review
                        - advanced
                      format: standard
      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:
    WordPressData:
      properties:
        posts:
          items:
            $ref: '#/components/schemas/Post'
          type: array
          title: Posts
          default: []
      type: object
      title: WordPressData
      description: WordPress sandbox data structure
    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
    Post:
      properties:
        title:
          type: string
          minLength: 1
          title: Title
        content:
          type: string
          title: Content
        status:
          type: string
          enum:
            - draft
            - publish
            - private
            - pending
            - trash
          title: Status
          default: draft
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        categories:
          items:
            type: string
          type: array
          title: Categories
          default: []
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
        publish_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Publish Date
        format:
          anyOf:
            - type: string
              enum:
                - standard
                - aside
                - gallery
                - link
                - image
                - quote
                - status
                - video
                - audio
                - chat
            - type: 'null'
          title: Format
      type: object
      required:
        - title
        - content
      title: Post
      description: WordPress post data
    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
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````