curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/duplicate' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}"
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending"
}
Duplicate Job V1
Clone any job’s params + template + agent_mode into a fresh queued run…
POST
/
api
/
v1
/
jobs
/
{job_id}
/
duplicate
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/duplicate' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}"
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
/replay-as-new (succeeded only) and /retry
(failed/cancelled only): this works for any source status
including running and awaiting_approval. Useful when you want to
fork an in-flight run rather than wait for it to terminate, or copy
a config from a long-lived sandbox session into a one-off task.
Source row is never modified; the new job is independent. Quota is
charged as a brand-new task.
Idempotency. Pass an Idempotency-Key header to make the
duplicate replay-safe: a retried POST returns the original
duplicate’s job id with Idempotency-Replayed: true instead of
creating another. The key is namespaced per source job so the same
caller key can be reused across different sources without collision.
Path parameters
string (uuid)
required
Headers
string,null
Request body
No request body.Response
TriggerResponse
string
required
UUID of the queued job. Use it for subsequent /jobs/:id calls.
string
required
Initial job status — usually ‘queued’. Replays of an idempotent request return the existing job’s current status.
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/duplicate' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}"
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending"
}
Last modified on September 21, 2026