---
title: "Create a new playground snippet"
method: POST
path: "/public/create-new-playground-snippet"
tags: ["Sandbox"]
---

# Create a new playground snippet

`POST /public/create-new-playground-snippet`

Create a new snippet to use as sandbox

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 60 requests in a window of 1m.

## Request body

- object
  - `data` object[], required
    - `data` object, required
      - `bootParams` union, required
        - object
          - `source` 'git-repo', required — Source type for creating playground snippet from a Git repository
          - `gitRepoUrl` string, uri, required — URL of the Git repository to clone for the playground snippet
          - `gitBranch` string — Git branch to checkout from the repository (defaults to main/master)
        - object
          - `source` 'empty', required — Source type for creating an empty playground snippet
          - `shouldBackupFilesystem` boolean, required — Whether to backup the filesystem state for future sessions. If passed true, and you resume the playground with its snippetId, you will get the same files back

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `playgroundSnippetId` string, required — Unique identifier for the created playground snippet. Use this to attach to the sandbox now and in future
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.net/fermion/apis/fermion-backend-api.md) · [All operations](https://skmtc.net/fermion/apis/fermion-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fermion/fermion-backend-api/revisions/7ce364c8820b/schema)
