---
title: "Update Test Configuration"
method: PUT
path: "/modules/{module}/test-configuration"
tags: ["test-run"]
---

# Update Test Configuration

`PUT /modules/{module}/test-configuration`

## Request

- Base URL: `https://example.scalr.io/api/iacp/v3`
- URL: `https://example.scalr.io/api/iacp/v3/modules/{module}/test-configuration`
- Auth: HTTP bearer

This endpoint creates or updates the module test configuration for a module.

## Path parameters

- `module` string, required

## Request body

- TestConfigurationDocument: JSON:API Document. see: https://jsonapi.org/format/#document-structure
  - `data` TestConfiguration: A test configuration for a module.
    - `attributes` object
      - `enabled` boolean: Indicates whether the test configuration is enabled.
      - `failure-behavior` 'failure' | 'notify': The failure behavior for the test configuration.
      - `trigger-on-new-version-enabled` boolean: Indicates whether the test run should be triggered when new module version is synced.
      - `trigger-on-pr-activity-enabled` boolean: Indicates whether the test configuration should be triggered on PR activity.
    - `id` string
    - `links` object
      - `self` string
    - `relationships` object, required
      - `module` object, required: The module this test configuration belongs to.
        - `data` object, required
          - `id` string, required
          - `type` 'modules' | '', required
      - `software-version` object: The software version this test configuration belongs to.
        - `data` object, nullable, required
          - `id` string, required
          - `type` 'software-versions' | '', required
    - `type` 'test-configurations', required
  - `included` object[]
  - `meta` object

## Response `200`

Success.

- TestConfigurationDocument: JSON:API Document. see: https://jsonapi.org/format/#document-structure
  - `data` TestConfiguration: A test configuration for a module.
    - `attributes` object
      - `enabled` boolean: Indicates whether the test configuration is enabled.
      - `failure-behavior` 'failure' | 'notify': The failure behavior for the test configuration.
      - `trigger-on-new-version-enabled` boolean: Indicates whether the test run should be triggered when new module version is synced.
      - `trigger-on-pr-activity-enabled` boolean: Indicates whether the test configuration should be triggered on PR activity.
    - `id` string
    - `links` object
      - `self` string
    - `relationships` object, required
      - `module` object, required: The module this test configuration belongs to.
        - `data` object, required
          - `id` string, required
          - `type` 'modules' | '', required
      - `software-version` object: The software version this test configuration belongs to.
        - `data` object, nullable, required
          - `id` string, required
          - `type` 'software-versions' | '', required
    - `type` 'test-configurations', required
  - `included` object[]
  - `meta` object

## Other responses

- `403`: User unauthorized to perform action.
- `404`: Module not found.
- `4XX`: Client error.
- `5XX`: Server error.

## Changes

- **2026-11-03** `d3e1dc85657a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalr/apis/scalr-iacp-api/changes/modules/:module/test-configuration/put.md)

---

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