**Source URL:** https://limited.veevavault.dev/qualityone/vault-api/api-reference/26.1/sandbox-vaults/create-or-refresh-sandbox

# Create or Refresh Sandbox

Create a new sandbox for the currently authenticated Vault. Include the `source_snapshot` parameter in the request body to create a new sandbox from an existing [snapshot](/qualityone/vault-api/api-reference/26.1/sandbox-vaults/sandbox-snapshots).

Providing a name which already exists will refresh the existing sandbox Vault. You can also [refresh a sandbox from a snapshot](/qualityone/vault-api/api-reference/26.1/sandbox-vaults/refresh-sandbox-from-snapshot).

<Endpoint path="/api/{version}/objects/sandbox" method="POST" />

## Headers

| Name | Description |
| --- | --- |
| `Accept` | `application/json` (default) or `application/xml` |
| `Content-Type` | `application/x-www-form-urlencoded` |

## Body Parameters

| Name | Description |
| --- | --- |
| `source`<Requiredness type="optional" /> | The source to refresh the sandbox from: `vault`; `snapshot` |
| `source_snapshot`<Requiredness type="optional" /> | If the source is a `snapshot`, provide the `api_name` of the snapshot to create the sandbox from. You can obtain the `api_name` using the [Retrieve Sandbox Snapshots](/qualityone/vault-api/api-reference/26.1/sandbox-vaults/sandbox-snapshots/retrieve-sandbox-snapshots) request. |
| `type`<Requiredness type="optional" /> | The type of sandbox, such as `config`. |
| `size`<Requiredness type="required" /> | The size of the sandbox: `Small`, `Medium`, `Large`, `Very Large`, `Extra Large`, or `Full`. Learn more about [sandbox sizes and their limits in Vault Help](https://platform.veevavault.help/en/lr/48988#sizes). |
| `domain`<Requiredness type="required" /> | The domain to use for the new sandbox. Must be a valid domain. You can retrieve valid domains from the [Retrieve Domains](/qualityone/vault-api/api-reference/26.1/domain-information/retrieve-domains) endpoint. Only domains of `type: Sandbox` are allowed. Must be lower-case, and must include the domain extension. |
| `name`<Requiredness type="required" /> | The name of the sandbox Vault, which appears on the *My Vaults* page. Providing a new name creates a new sandbox, whereas providing an existing name refreshes the existing sandbox. How often you can refresh a Vault depends on its size. Learn more about [refreshing sandboxes in Vault Help](https://platform.veevavault.help/en/lr/48988/#refresh). |
| `add_requester`<Requiredness type="optional" /> | This boolean field adds the currently authenticated user as a Vault Owner in the new sandbox. If set to `false,` the Domain Admin users in the sandbox domain will become Vault Owners in the sandbox Vault. If omitted, defaults to `true`. |
| `release`<Requiredness type="optional" /> | The type of release. This can be `general`, `limited`, or `prerelease`. If omitted, defaults to the release level of the source Vault. Learn more about [Vault releases in Vault Help](https://platform.veevavault.help/en/lr/11796). |

## Request

<CodeExample title="">
```bash
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "type=config" \
-d "size=Small" \
-d "domain=veepharm.com" \
-d "name=Sandbox" \
https://myvault.veevavault.com/api/v18.2/objects/sandbox
```
</CodeExample>

## Response

<CodeExample title="">
```json
{
    "responseStatus": "SUCCESS",
    "job_id": 70701,
    "url": "/api/v18.2/services/jobs/70701"
}
```
</CodeExample>

## Response Details

On `SUCCESS`, the response includes the following information:

| Name | Description |
| --- | --- |
| `job_id` | The Job ID value to retrieve the status and results of the sandbox creation request. |
| `url` | URL to retrieve the current status of the sandbox creation request. |

---

**Previous:** [Set Sandbox Entitlements](/qualityone/vault-api/api-reference/26.1/sandbox-vaults/set-sandbox-entitlements)  
**Next:** [Refresh Sandbox from Snapshot](/qualityone/vault-api/api-reference/26.1/sandbox-vaults/refresh-sandbox-from-snapshot)