---
title: "Create a new 'AutomationTestRun' entity"
method: POST
path: "/atm-testrun"
tags: ["AutomationTestRun"]
---

# Create a new 'AutomationTestRun' entity

`POST /atm-testrun`

## Request

- Base URL: `https://app.testiny.io/api/v1`
- URL: `https://app.testiny.io/api/v1/atm-testrun`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/testiny/apis/testiny-api/docs/atm-testrun/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new 'AutomationTestRun' entity. Returns full entity with new id and (optional) creation metadata.

## Request body

- AutomationTestRun
  - `id` integer: The unique entity id - must be a positive integer
  - `title` string: A descriptive title for this entity or mapping (1 to 200 characters)
  - `project_id` integer: The project id this entity or mapping belongs to
  - `closed_at` string, date-time: The time this automation test run was closed
  - `closed_by` number: The id of the user who closed this automation test run
  - `is_closed` boolean: Whether the automation test run is closed or not. While certain properties of a closed automation test run may still be modified, some referenced entities (e.g. test cases, results, ...) before the 'closed_at' date cannot be removed or changed until it is reopened.
  - `tags` string: A list of tags for this entity
  - `atm_source_id` integer: The atm_source_id property
  - `min_timestamp` number: The min_timestamp property
  - `max_timestamp` number: The max_timestamp property
  - `last_update_timestamp` number: The last_update_timestamp property
  - `duration` number: The duration property
  - `status_highest` number: The highest result status in this run, see the ordering of the result status values
  - `is_completed` boolean: The is_completed property
  - `is_pinned` boolean: The is_pinned property
  - `key_fields_raw` AutomationKeyRawFields
  - `description` string, nullable: An optional description for the test run (can be a rich text document, i.e. markdown with header line `<!--markdown-->` or Testiny JSON format)
  - `stat_passed_count` number: Number of passed results in this run
  - `stat_passed_warn_count` number: Number of passed with warning results in this run
  - `stat_skipped_count` number: Number of skipped results in this run
  - `stat_blocked_count` number: Number of blocked results in this run
  - `stat_failed_count` number: Number of failed results in this run

## Response `200`

Returns a single AutomationTestRun

- AutomationTestRun
  - `id` integer: The unique entity id - must be a positive integer
  - `title` string: A descriptive title for this entity or mapping (1 to 200 characters)
  - `project_id` integer: The project id this entity or mapping belongs to
  - `closed_at` string, date-time: The time this automation test run was closed
  - `closed_by` number: The id of the user who closed this automation test run
  - `is_closed` boolean: Whether the automation test run is closed or not. While certain properties of a closed automation test run may still be modified, some referenced entities (e.g. test cases, results, ...) before the 'closed_at' date cannot be removed or changed until it is reopened.
  - `tags` string: A list of tags for this entity
  - `atm_source_id` integer: The atm_source_id property
  - `min_timestamp` number: The min_timestamp property
  - `max_timestamp` number: The max_timestamp property
  - `last_update_timestamp` number: The last_update_timestamp property
  - `duration` number: The duration property
  - `status_highest` number: The highest result status in this run, see the ordering of the result status values
  - `is_completed` boolean: The is_completed property
  - `is_pinned` boolean: The is_pinned property
  - `key_fields_raw` AutomationKeyRawFields
  - `description` string, nullable: An optional description for the test run (can be a rich text document, i.e. markdown with header line `<!--markdown-->` or Testiny JSON format)
  - `stat_passed_count` number: Number of passed results in this run
  - `stat_passed_warn_count` number: Number of passed with warning results in this run
  - `stat_skipped_count` number: Number of skipped results in this run
  - `stat_blocked_count` number: Number of blocked results in this run
  - `stat_failed_count` number: Number of failed results in this run

## Other responses

- `4XX`: The request failed because invalid request parameters or data were supplied or access was denied.
- `5XX`: The request failed because an error occurred during processing of the request.

---

[API](https://skmtc.dev/testiny/apis/testiny-api.md) - [All operations](https://skmtc.dev/testiny/apis/testiny-api/llms.txt) - [OpenAPI document](https://skmtc.dev/testiny/apis/testiny-api/revisions/8f7643b2429d?raw)
