I know how to create them manually through the interface (it is really easy) setup > sandbox > new sandbox > and follow the GUI.

Is there an API or a script that would allow me to create a sandbox other than using the GUI. I would like to call that API or script from our build server (Jenkins) and allocate the sandboxes that way.


1 Answer 1


You want SandboxInfo via the Tooling API against your production org.

Represents a sandbox.

SandboxInfo enqueues a sandbox for creation or refresh. A create operation on SandboxInfo represents creation of a new sandbox, and an update represents refresh of an existing sandbox. For every create or update, a SandboxProcess is automatically created and is used for monitoring the sandbox copy process.

Also check SandboxProcess:

Represents the sandbox copy process for a SandboxInfo record.

When you create a SandboxInfo record, a corresponding SandboxProcess record is created. The latest SandboxProcess record for a SandboxInfo record represents the current state of the sandbox.

These were introduced in Winter '16 to allow you to create and refresh sandboxes.

The SandboxInfo will need the Template ID from the Sandbox Template (PartitionLevelScheme - keyprefix 1ps).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .