Skip to main content
POST
/
api
/
v1
/
tests
/
{testId}
/
runs
Start a test run
curl --request POST \
  --url https://api.getdecipher.com/api/v1/tests/{testId}/runs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.getdecipher.com/api/v1/tests/{testId}/runs"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.getdecipher.com/api/v1/tests/{testId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getdecipher.com/api/v1/tests/{testId}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.getdecipher.com/api/v1/tests/{testId}/runs"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.getdecipher.com/api/v1/tests/{testId}/runs")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.getdecipher.com/api/v1/tests/{testId}/runs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "object": "testRun",
  "id": 12345,
  "testId": 456,
  "testUrl": "https://app.getdecipher.com/tests/456",
  "runUrl": "https://app.getdecipher.com/tests/456/runs/12345",
  "status": "queued",
  "startedAt": "2026-02-16T05:00:00.000Z"
}
{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
}

Authorizations

Authorization
string
header
required

API key authentication. Use your Decipher API key as the bearer token.

Path Parameters

testId
string
required

The ID of the test to run

Example:

"456"

Response

Run created and queued for execution

object
enum<string>
required
Available options:
testRun
id
number
required
Example:

12345

testId
number
required
Example:

456

testUrl
string
required

Decipher dashboard link for the test

Example:

"https://app.getdecipher.com/tests/456"

runUrl
string
required

Decipher dashboard link for this run

Example:

"https://app.getdecipher.com/tests/456/runs/12345"

status
enum<string>
required

The run is queued for execution. Poll GET /test-runs/:runId until status becomes passed or failed.

Available options:
queued
startedAt
string
required

ISO timestamp when the run was created

Example:

"2026-02-16T05:00:00.000Z"