---
title: Edit an API test
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Synthetics
---

# Edit an API test{% #edit-an-api-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                              |
| ----------------- | ------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/api/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/api/{public_id}      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v1/synthetics/tests/api/{public_id}  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/api/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |

### Overview

Edit the configuration of a Synthetic API test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Request

#### Body Data (required)

New test details to be saved.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| assertions           | Option 7                                 | object          | An assertion that checks that an MCP server advertises the expected capabilities.                                                                                                                                                                                                               |
| Option 7             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 7             | target [*required*]                 | [string]        | List of MCP server capabilities to assert against.                                                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpServerCapabilities`                                                                                                                                                                                                                             |
| assertions           | Option 8                                 | object          | An assertion that verifies the MCP server response respects the MCP specification.                                                                                                                                                                                                              |
| Option 8             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpRespectsSpecification`                                                                                                                                                                                                                          |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`) and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on the parent step's `subtype`. Allowed enum values: `healthcheck,unary,init,tool_list,tool_call`                                                |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | mcpProtocolVersion                       | enum            | The MCP protocol version used by the step. See [https://modelcontextprotocol.io/specification](https://modelcontextprotocol.io/specification). Allowed enum values: `2025-06-18`                                                                                                                |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | toolArgs                                 | object          | Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.                                                                                                                                                                       |
| request              | toolName                                 | string          | The name of the MCP tool to call. Required when `callType` is `tool_call`.                                                                                                                                                                                                                      |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| assertions           | Option 7                                 | object          | An assertion that checks that an MCP server advertises the expected capabilities.                                                                                                                                                                                                               |
| Option 7             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 7             | target [*required*]                 | [string]        | List of MCP server capabilities to assert against.                                                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpServerCapabilities`                                                                                                                                                                                                                             |
| assertions           | Option 8                                 | object          | An assertion that verifies the MCP server response respects the MCP specification.                                                                                                                                                                                                              |
| Option 8             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpRespectsSpecification`                                                                                                                                                                                                                          |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`) and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on the parent step's `subtype`. Allowed enum values: `healthcheck,unary,init,tool_list,tool_call`                                                |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | mcpProtocolVersion                       | enum            | The MCP protocol version used by the step. See [https://modelcontextprotocol.io/specification](https://modelcontextprotocol.io/specification). Allowed enum values: `2025-06-18`                                                                                                                |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | toolArgs                                 | object          | Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.                                                                                                                                                                       |
| request              | toolName                                 | string          | The name of the MCP tool to call. Required when `callType` is `tool_call`.                                                                                                                                                                                                                      |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket,mcp`                                                                                                                                                                      |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "property": "{{ PROPERTY }}",
        "target": "text/html",
        "type": "header"
      },
      {
        "operator": "lessThan",
        "target": 2000,
        "type": "responseTime"
      },
      {
        "operator": "validatesJSONPath",
        "target": {
          "jsonPath": "topKey",
          "operator": "isNot",
          "targetValue": "0"
        },
        "type": "body"
      },
      {
        "operator": "validatesJSONSchema",
        "target": {
          "metaSchema": "draft-07",
          "jsonSchema": "{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}"
        },
        "type": "body"
      }
    ],
    "configVariables": [
      {
        "example": "content-type",
        "name": "PROPERTY",
        "pattern": "content-type",
        "type": "text"
      }
    ],
    "request": {
      "certificate": {
        "cert": {
          "filename": "cert-filename",
          "updatedAt": "2020-10-16T09:23:24.857Z"
        },
        "key": {
          "filename": "key-filename",
          "updatedAt": "2020-10-16T09:23:24.857Z"
        }
      },
      "headers": {
        "unique": "examplesynthetic"
      },
      "method": "GET",
      "timeout": 10,
      "url": "https://datadoghq.com"
    }
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_payload.json",
  "name": "Example-Synthetic-updated",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": true,
    "follow_redirects": true,
    "min_failure_duration": 10,
    "min_location_failed": 1,
    "monitor_name": "Test-TestSyntheticsAPITestLifecycle-1623076664",
    "monitor_priority": 5,
    "retry": {
      "count": 3,
      "interval": 10
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "testing:api"
  ],
  "type": "api"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic API test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| assertions           | Option 7                                 | object          | An assertion that checks that an MCP server advertises the expected capabilities.                                                                                                                                                                                                               |
| Option 7             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 7             | target [*required*]                 | [string]        | List of MCP server capabilities to assert against.                                                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpServerCapabilities`                                                                                                                                                                                                                             |
| assertions           | Option 8                                 | object          | An assertion that verifies the MCP server response respects the MCP specification.                                                                                                                                                                                                              |
| Option 8             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpRespectsSpecification`                                                                                                                                                                                                                          |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`) and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on the parent step's `subtype`. Allowed enum values: `healthcheck,unary,init,tool_list,tool_call`                                                |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | mcpProtocolVersion                       | enum            | The MCP protocol version used by the step. See [https://modelcontextprotocol.io/specification](https://modelcontextprotocol.io/specification). Allowed enum values: `2025-06-18`                                                                                                                |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | toolArgs                                 | object          | Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.                                                                                                                                                                       |
| request              | toolName                                 | string          | The name of the MCP tool to call. Required when `callType` is `tool_call`.                                                                                                                                                                                                                      |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| assertions           | Option 7                                 | object          | An assertion that checks that an MCP server advertises the expected capabilities.                                                                                                                                                                                                               |
| Option 7             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 7             | target [*required*]                 | [string]        | List of MCP server capabilities to assert against.                                                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpServerCapabilities`                                                                                                                                                                                                                             |
| assertions           | Option 8                                 | object          | An assertion that verifies the MCP server response respects the MCP specification.                                                                                                                                                                                                              |
| Option 8             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpRespectsSpecification`                                                                                                                                                                                                                          |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`) and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on the parent step's `subtype`. Allowed enum values: `healthcheck,unary,init,tool_list,tool_call`                                                |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | mcpProtocolVersion                       | enum            | The MCP protocol version used by the step. See [https://modelcontextprotocol.io/specification](https://modelcontextprotocol.io/specification). Allowed enum values: `2025-06-18`                                                                                                                |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | toolArgs                                 | object          | Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.                                                                                                                                                                       |
| request              | toolName                                 | string          | The name of the MCP tool to call. Required when `callType` is `tool_call`.                                                                                                                                                                                                                      |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket,mcp`                                                                                                                                                                      |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      []
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "mcpProtocolVersion": "2025-06-18",
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "toolArgs": {},
      "toolName": "search",
      "url": "https://example.com"
    },
    "steps": [],
    "variablesFromScript": "dd.variable.set(\"FOO\", \"foo\")"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Path parameters export public_id="CHANGE_ME" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v1/synthetics/tests/api/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF 
                        
##### 

```go
// Edit an API test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Property: datadog.PtrString("{{ PROPERTY }}"),
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("text/html")},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_HEADER,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_LESS_THAN,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(2000)},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_RESPONSE_TIME,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionJSONPathTarget: &datadogV1.SyntheticsAssertionJSONPathTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONJSONPATHOPERATOR_VALIDATES_JSON_PATH,
						Target: &datadogV1.SyntheticsAssertionJSONPathTargetTarget{
							JsonPath: datadog.PtrString("topKey"),
							Operator: datadog.PtrString("isNot"),
							TargetValue: &datadogV1.SyntheticsAssertionTargetValue{
								SyntheticsAssertionTargetValueString: datadog.PtrString("0")},
						},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_BODY,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionJSONSchemaTarget: &datadogV1.SyntheticsAssertionJSONSchemaTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONJSONSCHEMAOPERATOR_VALIDATES_JSON_SCHEMA,
						Target: &datadogV1.SyntheticsAssertionJSONSchemaTargetTarget{
							MetaSchema: datadogV1.SYNTHETICSASSERTIONJSONSCHEMAMETASCHEMA_DRAFT_07.Ptr(),
							JsonSchema: datadog.PtrString(`{"type": "object", "properties":{"slideshow":{"type":"object"}}}`),
						},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_BODY,
					}},
			},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Example: datadog.PtrString("content-type"),
					Name:    "PROPERTY",
					Pattern: datadog.PtrString("content-type"),
					Type:    datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
				},
			},
			Request: &datadogV1.SyntheticsTestRequest{
				Certificate: &datadogV1.SyntheticsTestRequestCertificate{
					Cert: &datadogV1.SyntheticsTestRequestCertificateItem{
						Filename:  datadog.PtrString("cert-filename"),
						UpdatedAt: datadog.PtrString("2020-10-16T09:23:24.857Z"),
					},
					Key: &datadogV1.SyntheticsTestRequestCertificateItem{
						Filename:  datadog.PtrString("key-filename"),
						UpdatedAt: datadog.PtrString("2020-10-16T09:23:24.857Z"),
					},
				},
				Headers: map[string]string{
					"unique": "examplesynthetic",
				},
				Method:  datadog.PtrString("GET"),
				Timeout: datadog.PtrFloat64(10),
				Url:     datadog.PtrString("https://datadoghq.com"),
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_payload.json",
		Name:    "Example-Synthetic-updated",
		Options: datadogV1.SyntheticsTestOptions{
			AcceptSelfSigned:   datadog.PtrBool(false),
			AllowInsecure:      datadog.PtrBool(true),
			FollowRedirects:    datadog.PtrBool(true),
			MinFailureDuration: datadog.PtrInt64(10),
			MinLocationFailed:  datadog.PtrInt64(1),
			MonitorName:        datadog.PtrString("Test-TestSyntheticsAPITestLifecycle-1623076664"),
			MonitorPriority:    datadog.PtrInt32(5),
			Retry: &datadogV1.SyntheticsTestOptionsRetry{
				Count:    datadog.PtrInt64(3),
				Interval: datadog.PtrFloat64(10),
			},
			TickEvery: datadog.PtrInt64(60),
		},
		Status:  datadogV1.SYNTHETICSTESTPAUSESTATUS_LIVE.Ptr(),
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_HTTP.Ptr(),
		Tags: []string{
			"testing:api",
		},
		Type: datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.UpdateAPITest(ctx, SyntheticsAPITestPublicID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdateAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdateAPITest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit an API test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathTargetTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaMetaSchema;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaTargetTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTargetValue;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .assertions(
                        Arrays.asList(
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .property("{{ PROPERTY }}")
                                    .target(new SyntheticsAssertionTargetValue("text/html"))
                                    .type(SyntheticsAssertionType.HEADER)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.LESS_THAN)
                                    .target(new SyntheticsAssertionTargetValue(2000.0))
                                    .type(SyntheticsAssertionType.RESPONSE_TIME)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionJSONPathTarget()
                                    .operator(
                                        SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH)
                                    .target(
                                        new SyntheticsAssertionJSONPathTargetTarget()
                                            .jsonPath("topKey")
                                            .operator("isNot")
                                            .targetValue(new SyntheticsAssertionTargetValue("0")))
                                    .type(SyntheticsAssertionType.BODY)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionJSONSchemaTarget()
                                    .operator(
                                        SyntheticsAssertionJSONSchemaOperator.VALIDATES_JSON_SCHEMA)
                                    .target(
                                        new SyntheticsAssertionJSONSchemaTargetTarget()
                                            .metaSchema(
                                                SyntheticsAssertionJSONSchemaMetaSchema.DRAFT_07)
                                            .jsonSchema(
                                                """
{"type": "object", "properties":{"slideshow":{"type":"object"}}}
"""))
                                    .type(SyntheticsAssertionType.BODY))))
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .example("content-type")
                                .name("PROPERTY")
                                .pattern("content-type")
                                .type(SyntheticsConfigVariableType.TEXT)))
                    .request(
                        new SyntheticsTestRequest()
                            .certificate(
                                new SyntheticsTestRequestCertificate()
                                    .cert(
                                        new SyntheticsTestRequestCertificateItem()
                                            .filename("cert-filename")
                                            .updatedAt("2020-10-16T09:23:24.857Z"))
                                    .key(
                                        new SyntheticsTestRequestCertificateItem()
                                            .filename("key-filename")
                                            .updatedAt("2020-10-16T09:23:24.857Z")))
                            .headers(Map.ofEntries(Map.entry("unique", "examplesynthetic")))
                            .method("GET")
                            .timeout(10.0)
                            .url("https://datadoghq.com")))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_test_payload.json")
            .name("Example-Synthetic-updated")
            .options(
                new SyntheticsTestOptions()
                    .acceptSelfSigned(false)
                    .allowInsecure(true)
                    .followRedirects(true)
                    .minFailureDuration(10L)
                    .minLocationFailed(1L)
                    .monitorName("Test-TestSyntheticsAPITestLifecycle-1623076664")
                    .monitorPriority(5)
                    .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0))
                    .tickEvery(60L))
            .status(SyntheticsTestPauseStatus.LIVE)
            .subtype(SyntheticsTestDetailsSubType.HTTP)
            .tags(Collections.singletonList("testing:api"))
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.updateAPITest(SYNTHETICS_API_TEST_PUBLIC_ID, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#updateAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Edit an API test returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
    SyntheticsAssertionJSONPathTargetTarget,
)
from datadog_api_client.v1.model.synthetics_assertion_json_schema_meta_schema import (
    SyntheticsAssertionJSONSchemaMetaSchema,
)
from datadog_api_client.v1.model.synthetics_assertion_json_schema_operator import SyntheticsAssertionJSONSchemaOperator
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target import SyntheticsAssertionJSONSchemaTarget
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target_target import (
    SyntheticsAssertionJSONSchemaTargetTarget,
)
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest
from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate
from datadog_api_client.v1.model.synthetics_test_request_certificate_item import SyntheticsTestRequestCertificateItem

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        assertions=[
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                _property="{{ PROPERTY }}",
                target="text/html",
                type=SyntheticsAssertionType.HEADER,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.LESS_THAN,
                target=2000,
                type=SyntheticsAssertionType.RESPONSE_TIME,
            ),
            SyntheticsAssertionJSONPathTarget(
                operator=SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH,
                target=SyntheticsAssertionJSONPathTargetTarget(
                    json_path="topKey",
                    operator="isNot",
                    target_value="0",
                ),
                type=SyntheticsAssertionType.BODY,
            ),
            SyntheticsAssertionJSONSchemaTarget(
                operator=SyntheticsAssertionJSONSchemaOperator.VALIDATES_JSON_SCHEMA,
                target=SyntheticsAssertionJSONSchemaTargetTarget(
                    meta_schema=SyntheticsAssertionJSONSchemaMetaSchema.DRAFT_07,
                    json_schema='{"type": "object", "properties":{"slideshow":{"type":"object"}}}',
                ),
                type=SyntheticsAssertionType.BODY,
            ),
        ],
        config_variables=[
            SyntheticsConfigVariable(
                example="content-type",
                name="PROPERTY",
                pattern="content-type",
                type=SyntheticsConfigVariableType.TEXT,
            ),
        ],
        request=SyntheticsTestRequest(
            certificate=SyntheticsTestRequestCertificate(
                cert=SyntheticsTestRequestCertificateItem(
                    filename="cert-filename",
                    updated_at="2020-10-16T09:23:24.857Z",
                ),
                key=SyntheticsTestRequestCertificateItem(
                    filename="key-filename",
                    updated_at="2020-10-16T09:23:24.857Z",
                ),
            ),
            headers=SyntheticsTestHeaders(
                unique="examplesynthetic",
            ),
            method="GET",
            timeout=10.0,
            url="https://datadoghq.com",
        ),
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_payload.json",
    name="Example-Synthetic-updated",
    options=SyntheticsTestOptions(
        accept_self_signed=False,
        allow_insecure=True,
        follow_redirects=True,
        min_failure_duration=10,
        min_location_failed=1,
        monitor_name="Test-TestSyntheticsAPITestLifecycle-1623076664",
        monitor_priority=5,
        retry=SyntheticsTestOptionsRetry(
            count=3,
            interval=10.0,
        ),
        tick_every=60,
    ),
    status=SyntheticsTestPauseStatus.LIVE,
    subtype=SyntheticsTestDetailsSubType.HTTP,
    tags=[
        "testing:api",
    ],
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.update_api_test(public_id=SYNTHETICS_API_TEST_PUBLIC_ID, body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit an API test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    assertions: [
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        property: "{{ PROPERTY }}",
        target: "text/html",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::HEADER,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
        target: 2000,
        type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionJSONPathTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH,
        target: DatadogAPIClient::V1::SyntheticsAssertionJSONPathTargetTarget.new({
          json_path: "topKey",
          operator: "isNot",
          target_value: "0",
        }),
        type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA,
        target: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTargetTarget.new({
          meta_schema: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07,
          json_schema: '{"type": "object", "properties":{"slideshow":{"type":"object"}}}',
        }),
        type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
      }),
    ],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        example: "content-type",
        name: "PROPERTY",
        pattern: "content-type",
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      certificate: DatadogAPIClient::V1::SyntheticsTestRequestCertificate.new({
        cert: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
          filename: "cert-filename",
          updated_at: "2020-10-16T09:23:24.857Z",
        }),
        key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
          filename: "key-filename",
          updated_at: "2020-10-16T09:23:24.857Z",
        }),
      }),
      headers: {
        unique: "examplesynthetic",
      },
      method: "GET",
      timeout: 10,
      url: "https://datadoghq.com",
    }),
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_payload.json",
  name: "Example-Synthetic-updated",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    accept_self_signed: false,
    allow_insecure: true,
    follow_redirects: true,
    min_failure_duration: 10,
    min_location_failed: 1,
    monitor_name: "Test-TestSyntheticsAPITestLifecycle-1623076664",
    monitor_priority: 5,
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
      count: 3,
      interval: 10,
    }),
    tick_every: 60,
  }),
  status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP,
  tags: [
    "testing:api",
  ],
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.update_api_test(SYNTHETICS_API_TEST_PUBLIC_ID, body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Edit an API test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathTargetTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaMetaSchema;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaTargetTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTargetValue;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificate;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificateItem;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body =
        SyntheticsAPITest::new(
            SyntheticsAPITestConfig::new()
                .assertions(
                    vec![
                        SyntheticsAssertion::SyntheticsAssertionTarget(
                            Box::new(
                                SyntheticsAssertionTarget::new(
                                    SyntheticsAssertionOperator::IS,
                                    SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                                        "text/html".to_string(),
                                    ),
                                    SyntheticsAssertionType::HEADER,
                                ).property("{{ PROPERTY }}".to_string()),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionTarget(
                            Box::new(
                                SyntheticsAssertionTarget::new(
                                    SyntheticsAssertionOperator::LESS_THAN,
                                    SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                                        2000.0 as f64,
                                    ),
                                    SyntheticsAssertionType::RESPONSE_TIME,
                                ),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(
                            Box::new(
                                SyntheticsAssertionJSONPathTarget::new(
                                    SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH,
                                    SyntheticsAssertionType::BODY,
                                ).target(
                                    SyntheticsAssertionJSONPathTargetTarget::new()
                                        .json_path("topKey".to_string())
                                        .operator("isNot".to_string())
                                        .target_value(
                                            SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                                                "0".to_string(),
                                            ),
                                        ),
                                ),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(
                            Box::new(
                                SyntheticsAssertionJSONSchemaTarget::new(
                                    SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA,
                                    SyntheticsAssertionType::BODY,
                                ).target(
                                    SyntheticsAssertionJSONSchemaTargetTarget::new()
                                        .json_schema(
                                            r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(),
                                        )
                                        .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07),
                                ),
                            ),
                        )
                    ],
                )
                .config_variables(
                    vec![
                        SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT)
                            .example("content-type".to_string())
                            .pattern("content-type".to_string())
                    ],
                )
                .request(
                    SyntheticsTestRequest::new()
                        .certificate(
                            SyntheticsTestRequestCertificate::new()
                                .cert(
                                    SyntheticsTestRequestCertificateItem::new()
                                        .filename("cert-filename".to_string())
                                        .updated_at("2020-10-16T09:23:24.857Z".to_string()),
                                )
                                .key(
                                    SyntheticsTestRequestCertificateItem::new()
                                        .filename("key-filename".to_string())
                                        .updated_at("2020-10-16T09:23:24.857Z".to_string()),
                                ),
                        )
                        .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())]))
                        .method("GET".to_string())
                        .timeout(10.0 as f64)
                        .url("https://datadoghq.com".to_string()),
                ),
            vec!["aws:us-east-2".to_string()],
            "BDD test payload: synthetics_api_test_payload.json".to_string(),
            "Example-Synthetic-updated".to_string(),
            SyntheticsTestOptions::new()
                .accept_self_signed(false)
                .allow_insecure(true)
                .follow_redirects(true)
                .min_failure_duration(10)
                .min_location_failed(1)
                .monitor_name("Test-TestSyntheticsAPITestLifecycle-1623076664".to_string())
                .monitor_priority(5)
                .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64))
                .tick_every(60),
            SyntheticsAPITestType::API,
        )
            .status(SyntheticsTestPauseStatus::LIVE)
            .subtype(SyntheticsTestDetailsSubType::HTTP)
            .tags(vec!["testing:api".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .update_api_test(synthetics_api_test_public_id.clone(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit an API test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiUpdateAPITestRequest = {
  body: {
    config: {
      assertions: [
        {
          operator: "is",
          property: "{{ PROPERTY }}",
          target: "text/html",
          type: "header",
        },
        {
          operator: "lessThan",
          target: 2000,
          type: "responseTime",
        },
        {
          operator: "validatesJSONPath",
          target: {
            jsonPath: "topKey",
            operator: "isNot",
            targetValue: "0",
          },
          type: "body",
        },
        {
          operator: "validatesJSONSchema",
          target: {
            metaSchema: "draft-07",
            jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
          },
          type: "body",
        },
      ],
      configVariables: [
        {
          example: "content-type",
          name: "PROPERTY",
          pattern: "content-type",
          type: "text",
        },
      ],
      request: {
        certificate: {
          cert: {
            filename: "cert-filename",
            updatedAt: "2020-10-16T09:23:24.857Z",
          },
          key: {
            filename: "key-filename",
            updatedAt: "2020-10-16T09:23:24.857Z",
          },
        },
        headers: {
          unique: "examplesynthetic",
        },
        method: "GET",
        timeout: 10,
        url: "https://datadoghq.com",
      },
    },
    locations: ["aws:us-east-2"],
    message: "BDD test payload: synthetics_api_test_payload.json",
    name: "Example-Synthetic-updated",
    options: {
      acceptSelfSigned: false,
      allowInsecure: true,
      followRedirects: true,
      minFailureDuration: 10,
      minLocationFailed: 1,
      monitorName: "Test-TestSyntheticsAPITestLifecycle-1623076664",
      monitorPriority: 5,
      retry: {
        count: 3,
        interval: 10,
      },
      tickEvery: 60,
    },
    status: "live",
    subtype: "http",
    tags: ["testing:api"],
    type: "api",
  },
  publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
};

apiInstance
  .updateAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
