---
title: "Create a test environment job"
method: POST
path: "/test-environments/{id}/jobs"
tags: ["Test Environment Jobs"]
---

# Create a test environment job

`POST /test-environments/{id}/jobs`

Use this operation to create a new job for a specific Test Environment. 
It handles HTTP POST requests to the /test-environments/{id}/jobs endpoint, 
accepting a JobRequest object in the request body. Upon successful creation, 
it returns a JobResponse object and sets the Location header to the polling 
URL for the created job.

### User Access Permission

You must be assigned the **Refresh Central Sandbox** permission to run this operation.

## Path parameters

- `id` string, required

## Headers

- `Zuora-Entity-Ids` string
- `Zuora-Track-Id` string
- `Accept-Encoding` string
- `Content-Encoding` string

## Request body

- JobRequest — Request for creating test environment job
  - `jobType` 'REFRESH', required — The type of workflow job to be performed on the Test Environment
  - `scheduledRefreshTime` string, date-time — Optional date for scheduling a job

## Response `200`

OK

- JobResponse — The job response
  - `createTime` string, date-time — The date and time when the job was first synced to self service
  - `createdById` string — The automatically generated ID of the Zuora user who created the job object
  - `estimatedCompletionTime` string, date-time — The date and time when the job is estimated to be completed
  - `id` string — The unique ID (UUID) of the Test Environment job
  - `jobEndTime` string, date-time — The date and time when the job completed
  - `jobStartTime` string, date-time — The date and time when the job was started
  - `jobType` 'REFRESH' | 'CREATE' | 'DELETE' — The type of Test Environment job being performed
  - `progressPercentage` integer — The progress percentage of the job
  - `scheduledRefreshTime` string, date-time — The optional date and time for scheduling a job
  - `status` 'NEW' | 'SCHEDULED' | 'QUEUED' | 'INITIATED' | 'PROVISIONING' | 'DEPROVISIONING' | 'EXPORTING' | 'SCRUBBING' | 'RESETTING' | 'IMPORTING' | 'FINALIZING' | 'CANCELLING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' — The status of the Test Environment job
  - `testEnvironmentId` string — The Test Environment to which this job belongs
  - `updateTime` string, date-time — The date and time when the job was last synced to self-service
  - `updatedById` string — The automatically generated ID of the Zuora user who updated the job object

## Other responses

- `201` — Successfully created a new Test Environment job
- `400` — Bad request
- `403` — Only one refresh can be performed during a set period
- `500` — Internal Error

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
