Skip to content

Quickstart

Create a sandbox, run a command, and delete it when finished.

  • curl and jq.
  • Your provider’s API URL and a team token. See authentication.
  1. Set your API URL. Supply WISPS_TOKEN through your secret manager or local environment; do not commit it.

    Terminal window
    export WISPS_URL=https://api.example.com
  2. Create a sandbox. Save its generated name. Without a mode, the API creates an ephemeral wisp.

    Terminal window
    WISP_NAME=$(
    curl --fail-with-body -sS \
    -H "Authorization: Bearer $WISPS_TOKEN" \
    -H 'Content-Type: application/json' \
    "$WISPS_URL/v1/wisps" \
    -d '{}' | jq -er '.name'
    )
  3. Run a command. The request waits for the command to finish.

    Terminal window
    curl --fail-with-body -sS \
    -H "Authorization: Bearer $WISPS_TOKEN" \
    -H 'Content-Type: application/json' \
    "$WISPS_URL/v1/wisps/$WISP_NAME/run" \
    -d '{"script":"printf hello"}'
  4. Delete the sandbox when you no longer need its files.

    Terminal window
    curl --fail-with-body -sS -X DELETE \
    -H "Authorization: Bearer $WISPS_TOKEN" \
    "$WISPS_URL/v1/wisps/$WISP_NAME"

The run response contains "exit_code":0 and "stdout":"hello". Deletion returns HTTP 204 with no body.

Use the SDKs for typed calls, or learn about commands, files, and lifecycle.