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

# Sandbox Mode

> Testing environment for CrunchzApp WhatsApp API with limited functionality

<Tip>
  Sandbox Mode is a restricted testing environment for new channels. It allows users to test certain API functionalities before subscribing to a plan. Unlike Production Mode, Sandbox Mode limits the channel's interactions to a single designated contact.
</Tip>

<CardGroup cols={3}>
  <Card title="Limited Testing" icon="flask" color="#3565F7">
    Test API with one contact
  </Card>

  <Card title="7-Day Trial" icon="calendar" color="#FFA500">
    Free testing period
  </Card>

  <Card title="Easy Upgrade" icon="arrow-up-right" color="#25D366">
    Subscribe to remove limits
  </Card>
</CardGroup>

## How Sandbox Works

<Steps>
  <Step title="Channel Creation" icon="circle-plus">
    When creating a new channel, users can choose between Sandbox Mode and Production Mode via a switch button in the form.
  </Step>

  <Step title="Contact Assignment" icon="address-book">
    If Sandbox Mode is selected, the user must provide a phone number. The channel can only interact with this one predefined contact.
  </Step>

  <Step title="Trial Period" icon="clock">
    The trial period for Sandbox Mode lasts 7 days. After 7 days, the channel and its data are automatically deleted if no subscription is purchased.
  </Step>

  <Step title="Subscription Benefits" icon="credit-card">
    Subscribing to a plan automatically removes the Sandbox restrictions and transitions the channel to Production Mode.
  </Step>
</Steps>

<Callout type="warning" title="Token Limitation">
  Sandbox Mode only works with its own token and does not support the use of a Global Token.
</Callout>

## API Limitations in Sandbox Mode

<CardGroup cols={2}>
  <Card title="Endpoint Restrictions" icon="lock" color="#FF4D4F">
    * Only specific API endpoints are allowed
    * Any request requiring contact\_id must match the preassigned phone number
    * Requests to unauthorized endpoints will be rejected
  </Card>

  <Card title="Allowed Endpoints" icon="circle-check" color="#25D366">
    * All endpoints that do not include contact\_id will be rejected
    * Endpoints that include contact\_id will be allowed only if the provided phone number matches the sandbox.phoneNumber
  </Card>
</CardGroup>

## Error Handling in Sandbox

<Callout type="error">
  If an unauthorized API is called, the system will return a message **"This feature is not available in Sandbox Mode."**

  If the contact\_id does not match the assigned number the system will return a message **"Unauthorized contact for Sandbox Mode."**
</Callout>

## How to Transition to Production

<Steps>
  <Step title="Subscribe to a Plan" icon="credit-card">
    To remove Sandbox restrictions, the user must subscribe to a paid plan.
  </Step>

  <Step title="Automatic Transition" icon="arrow-right-arrow-left">
    Upon successful subscription, the channel transitions to Production Mode.
  </Step>

  <Step title="Unlimited Contacts" icon="users">
    The predefined contact limitation is lifted, allowing you to interact with any number of contacts.
  </Step>
</Steps>

## Best Practices

<CardGroup cols={3}>
  <Card title="Initial Testing" icon="vial" color="#3565F7">
    Use Sandbox Mode for initial integration testing.
  </Card>

  <Card title="Assigned Contact" icon="user-check" color="#3565F7">
    Test only with the assigned contact to prevent issues.
  </Card>

  <Card title="Verify Features" icon="clipboard-check" color="#3565F7">
    Before going live, ensure all necessary features work as expected.
  </Card>
</CardGroup>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I extend the Sandbox trial?">
    No, the trial period is fixed at 7 days. After expiration, the channel is deleted.
  </Accordion>

  <Accordion title="What happens when the Sandbox expires?">
    If no subscription is active, the channel is deleted permanently.
  </Accordion>

  <Accordion title="Can I manually switch between Sandbox and Production?">
    No, but you can select the mode when creating a new channel.
  </Accordion>

  <Accordion title="Can I add more than one contact in Sandbox Mode?">
    No, Sandbox Mode allows interactions with only one predefined contact.
  </Accordion>
</AccordionGroup>

<Note>
  Ready to test the CrunchzApp WhatsApp API? Create a Sandbox channel to start experimenting with our API features before committing to a subscription plan.
</Note>
