# Create a Claimable Sandbox

Create a claimable sandbox with prefilled data. The response includes an onboarding link that lets a user claim the sandbox into a new or existing Stripe account.

## Request

```curl
curl -X POST https://api.stripe.com/v2/core/claimable_sandboxes \
  -H "Authorization: Bearer STRIPE_MANAGED_APP_SANDBOX_KEY" \
  -H "Stripe-Version: 2026-11-18.endive" \
  --json '{
    "channel": "public",
    "enable_mcp_access": true,
    "prefill": {
        "email": "jenny.rosen@stripe.com",
        "name": "Jenny Sandbox",
        "country": "US"
    },
    "onboarding_link_details": {
        "refresh_url": "https://example.com/refresh"
    }
  }'
```

### Response

```json
{
  "id": "clmsbx_test_61THl3VA5Zt5cTqbP16T9R4DRrSQbEWmWeLUx7WmOR8K",
  "object": "v2.core.claimable_sandbox",
  "channel": "public",
  "claimed_at": null,
  "created": "2025-01-01T00:00:00.000Z",
  "expires_at": "2025-03-01T00:00:00.000Z",
  "onboarding_link_details": {
    "url": "https://dashboard.stripe.com/onboard_sandbox/YWNjdF8xUnpQRldSb.....",
    "expires_at": "2025-01-07T01:00:00.000Z",
    "refresh_url": "https://example.com/refresh"
  },
  "owner_details": null,
  "prefill": {
    "country": "US",
    "email": "jenny.rosen@stripe.com",
    "name": "Jenny Sandbox"
  },
  "sandbox_details": {
    "account": "acct_1RzPFWRlMpFp5RCK",
    "api_keys": {
      "mcp": {
        "id": "mk_18RkyMuFU1BEEEYtWneAyGxq",
        "created": "2025-01-01T00:00:00.000Z",
        "expires_at": null,
        "status": "active",
        "type": "secret_key",
        "secret_key": {
          "token": "rk_test_51RzPFWRlMpFp5....."
        }
      },
      "publishable": {
        "id": "mk_1pfAYapEPoKex4w2LXDPJpFl",
        "created": "2025-01-01T00:00:00.000Z",
        "expires_at": null,
        "status": "active",
        "type": "publishable_key",
        "publishable_key": {
          "token": "pk_test_51RzPFWRlMpFp5....."
        }
      },
      "secret": {
        "id": "mk_11N3pDMHIuerdcSArc2xVyXk",
        "created": "2025-01-01T00:00:00.000Z",
        "expires_at": null,
        "status": "active",
        "type": "secret_key",
        "secret_key": {
          "token": "sk_test_51RzPFWRlMpFp5....."
        }
      }
    }
  },
  "status": "unclaimed",
  "livemode": false
}
```

## Parameters

- `enable_mcp_access` (boolean, required)
  If true, returns a key that can be used with [Stripe’s MCP server](https://docs.stripe.com/mcp.md).

- [`onboarding_link_details`](https://docs.stripe.com/api/v2/core/claimable-sandboxes/create.md?query=onboarding_link_details) (object, required)
  Details about the onboarding link.

- [`prefill`](https://docs.stripe.com/api/v2/core/claimable-sandboxes/create.md?query=prefill) (object, required)
  Values that are prefilled when a user claims the sandbox. When a user claims the sandbox, they will be able to update these values.

- `channel` (enum, optional)
  The distribution channel used to pre-install your Stripe App on the claimable sandbox. Use `testing` to install your app’s external test version or `public` to install its published version. This field defaults to `public` if omitted.
Possible enum values:
  - `public`
    Public channel.

  - `testing`
    Testing channel.

## Returns

Returns a [Claimable Sandbox object](https://docs.stripe.com/api/v2/core/claimable-sandboxes/object.md).

## Error Codes

| HTTP status code | Code | Description |
| --- | --- | --- |
| 400 | claimable_sandbox_account_not_configured | The account calling the API is not an app managed sandbox associated with a claimable sandbox Stripe App. See the [claimable sandboxes guide](https://docs.stripe.com/sandboxes/claimable-sandboxes.md) on how to set up a claimable sandbox Stripe App. |
| 400 | claimable_sandbox_app_public_version_missing | When channel is set to public but the app does not have a published version configured. |
| 400 | claimable_sandbox_app_test_version_missing | When channel is set to testing but the app does not have a test version configured. |
| 400 | claimable_sandbox_app_testing_channel_install_limit_exceeded | When the account has reached its testing channel live mode install limit and can no longer provision new claimable sandboxes in the testing channel. |
| 400 | claimable_sandbox_monthly_quota_exceeded | When the account has reached its claimable sandbox creation limit for the rolling 30-day period. |
| 409 | idempotency_error | An idempotent retry occurred with different request parameters. |
| 429 | claimable_sandbox_creation_rate_limit_exceeded | When the account reaches its claimable sandbox creation rate limit for the public channel. |
| 429 | claimable_sandbox_testing_creation_rate_limit_exceeded | When the account reaches its claimable sandbox creation rate limit for the testing channel. |
