---
updatedAt: 2026-03-01T18:29:26.000Z
---

# Create a new test configuration

Create either a new availability test configuration or a new performance test configuration, if there is an available corresponding slot in the contract's quotas.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Service-Level Agreement API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://{hostname}/sla-api/v1"
    }
  ],
  "paths": {
    "/tests": {
      "post": {
        "operationId": "post-test-config",
        "summary": "Create a new test configuration",
        "tags": [
          "Create Test"
        ],
        "description": "Create either a new availability test configuration or a new performance test configuration, if there is an available corresponding slot in the contract's quotas.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "groupId": 1,
                "contractId": "1-2ABCD",
                "agentGroupId": 123,
                "name": "My Test Name",
                "type": "PERFORMANCE",
                "performanceSlaTarget": 1.1,
                "testDetails": {
                  "originUrl": "http://www.example.com/testObject.txt",
                  "akamaiUrl": "http://www.example.com/testObject.txt",
                  "originDnsHostnameOverride": "unpredictablestring-www.example.com"
                }
              },
              "schema": {
                "type": "object",
                "description": "Represents a configuration of either an availability test or a performance test. You can use a test object to add a new test configuration, update an existing one, or get the settings of a specified configuration.\n",
                "properties": {
                  "groupId": {
                    "type": "integer",
                    "description": "Identifies the group containing the property. See the [Property Manager API](https://techdocs.akamai.com/property-mgr/reference) (PAPI), which provides these IDs. Required when creating a test configuration.\n"
                  },
                  "contractId": {
                    "type": "string",
                    "description": "The contract associated with the test configuration.\n",
                    "minLength": 1
                  },
                  "agentGroupId": {
                    "type": "integer",
                    "description": "Code representing the agent group (also called a region or regional SLA) for the test configuration. See [agentGroupId values](https://techdocs.akamai.com/sla/reference/agentgroupid-values).\n"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name you create to identify test configurations and their associated reports.\n",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "PERFORMANCE",
                      "AVAILABILITY"
                    ],
                    "description": "The test configuration type, either `PERFORMANCE` or `AVAILABILITY`.\n",
                    "minLength": 1
                  },
                  "performanceSlaTarget": {
                    "type": "number",
                    "description": "The target performance as specified in the SLA, expressed as a decimal greater than or equal to 1.0. For a target performance improvement of 20%, specify 1.2.\n"
                  },
                  "testDetails": {
                    "type": "object",
                    "description": "Contains test object location and hostnames.\n",
                    "properties": {
                      "originUrl": {
                        "type": "string",
                        "description": "The URL of the test object for the origin portion of the test. Use the outward-facing hostname if `originDnsHostnameOverride` is included, otherwise  use the origin hostname.\n",
                        "minLength": 1
                      },
                      "akamaiUrl": {
                        "type": "string",
                        "description": "The URL of the test object for the CDN portion of the test.\n",
                        "minLength": 1
                      },
                      "originDnsHostnameOverride": {
                        "type": "string",
                        "description": "Replaces the hostname in `originUrl` for the purposes of DNS lookup to obtain the IP address of the origin server. Use this if requests sent directly to your origin hostname redirect to the CDN.\n",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "originUrl",
                      "akamaiUrl",
                      "originDnsHostnameOverride"
                    ]
                  }
                },
                "required": [
                  "groupId",
                  "contractId",
                  "agentGroupId",
                  "name",
                  "type",
                  "performanceSlaTarget",
                  "testDetails"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "slaTestId": 82
                },
                "schema": {
                  "type": "object",
                  "description": "Represents a configuration of either an availability test or a performance test. A test object can be used to add a new test configuration, update an existing one, or get the settings of a specified configuration.\n",
                  "properties": {
                    "slaTestId": {
                      "type": "integer",
                      "description": "Identifies each test configuration.\n"
                    }
                  },
                  "required": [
                    "slaTestId"
                  ]
                }
              }
            },
            "description": "Successfully created.\n"
          }
        }
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "externalDocs": {
    "url": "https://techdocs.akamai.com/sla/reference",
    "description": "See documention for Akamai's Service-Level Agreement API"
  }
}
```