Skip to content
Testsigma DOCS

Schedule a test plan

POST/schedule_executions

Base URL  https://app.testsigma.com/api/v1

Create a schedule for a test plan using the REST API.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
nameThe name you want to give to the test schedule.
executionIdTest plan ID from the GET API.
scheduleTypeHow frequently you want to run tests — ONCE, HOURLY, DAILY, WEEKLY, MONTHLY.
statusStatus of the schedule, e.g. ACTIVE.
nextIntervalDate and time (yyyy-MM-dd'T'HH:mm:ss.SSS) to trigger the test plan. Sample data: 2022-12-14T11:13:00.000
timezoneThe timezone you want to follow.
idThe ID of the schedule.
executionIdTest plan ID from the GET API.
nameThe name given to the test schedule.
commentsComments on the schedule.
scheduleTypeHow frequently tests run — ONCE, HOURLY, DAILY, WEEKLY, MONTHLY.
nextIntervalEpoch timestamp of the next trigger interval.
nextIntervalUTCNext trigger interval in UTC.
createdByIdThe user ID of the creator.
createdDateDate when the schedule was created.
updatedByIdThe user ID of the updater.
updatedDateDate when the schedule was updated.
statusStatus of the schedule.
REQUEST
curl -X POST \
  'https://app.testsigma.com/api/v1/schedule_executions' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "New Test Plan Schedule",
    "executionId": 180,
    "scheduleType": "ONCE",
    "status": "ACTIVE",
    "nextInterval": "2022-12-14T11:13:00.000",
    "timezone": "EST"
  }'
const response = await fetch('https://app.testsigma.com/api/v1/schedule_executions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "name": "New Test Plan Schedule",
      "executionId": 180,
      "scheduleType": "ONCE",
      "status": "ACTIVE",
      "nextInterval": "2022-12-14T11:13:00.000",
      "timezone": "EST"
  })
});
const data = await response.json();
import requests

response = requests.post(
  'https://app.testsigma.com/api/v1/schedule_executions',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  json={
      "name": "New Test Plan Schedule",
      "executionId": 180,
      "scheduleType": "ONCE",
      "status": "ACTIVE",
      "nextInterval": "2022-12-14T11:13:00.000",
      "timezone": "EST"
  }
)
data = response.json()
RESPONSE200OK
{
  "id": 21,
  "executionId": 180,
  "name": "New Test Plan Schedule",
  "comments": null,
  "scheduleType": "WEEKLY",
  "nextInterval": 1671016380000,
  "nextIntervalUTC": "2022-12-14T11:13:00Z",
  "createdById": 10,
  "createdDate": 1671006911289,
  "updatedById": 10,
  "updatedDate": 1671006911289,
  "status": "ACTIVE"
}