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

# Create an API test{% #create-an-api-test %}
Copy pageCopied
{% tab title="v1" %}

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

### Overview

Create 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.



### Request

#### Body Data (required)

Details of the test to create.

{% 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.                                                                                                                                                                                                                                             |
| basicAuth            | Option 7                                 | object          | Object to handle JWT authentication when performing the test.                                                                                                                                                                                                                                   |
| Option 7             | addClaims                                | object          | Standard JWT claims to automatically inject.                                                                                                                                                                                                                                                    |
| addClaims            | exp                                      | boolean         | Whether to inject the `exp` (expiration) claim.                                                                                                                                                                                                                                                 |
| addClaims            | iat                                      | boolean         | Whether to inject the `iat` (issued at) claim.                                                                                                                                                                                                                                                  |
| Option 7             | algorithm [*required*]              | enum            | Algorithm to use for the JWT authentication. Allowed enum values: `HS256,RS256,ES256`                                                                                                                                                                                                           |
| Option 7             | expiresIn                                | int64           | Token time-to-live in seconds.                                                                                                                                                                                                                                                                  |
| Option 7             | header                                   | string          | Custom JWT header as a JSON string.                                                                                                                                                                                                                                                             |
| Option 7             | payload [*required*]                | string          | JWT claims as a JSON string.                                                                                                                                                                                                                                                                    |
| Option 7             | secret [*required*]                 | string          | Signing key for the JWT authentication. Use the shared secret for `HS256` or the private key (PEM format) for `RS256` and `ES256`.                                                                                                                                                              |
| Option 7             | tokenPrefix                              | string          | Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `jwt`                                                                                                                                                                                                          |
| 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.                                                                                                                                                                                                                                             |
| basicAuth            | Option 7                                 | object          | Object to handle JWT authentication when performing the test.                                                                                                                                                                                                                                   |
| Option 7             | addClaims                                | object          | Standard JWT claims to automatically inject.                                                                                                                                                                                                                                                    |
| addClaims            | exp                                      | boolean         | Whether to inject the `exp` (expiration) claim.                                                                                                                                                                                                                                                 |
| addClaims            | iat                                      | boolean         | Whether to inject the `iat` (issued at) claim.                                                                                                                                                                                                                                                  |
| Option 7             | algorithm [*required*]              | enum            | Algorithm to use for the JWT authentication. Allowed enum values: `HS256,RS256,ES256`                                                                                                                                                                                                           |
| Option 7             | expiresIn                                | int64           | Token time-to-live in seconds.                                                                                                                                                                                                                                                                  |
| Option 7             | header                                   | string          | Custom JWT header as a JSON string.                                                                                                                                                                                                                                                             |
| Option 7             | payload [*required*]                | string          | JWT claims as a JSON string.                                                                                                                                                                                                                                                                    |
| Option 7             | secret [*required*]                 | string          | Signing key for the JWT authentication. Use the shared secret for `HS256` or the private key (PEM format) for `RS256` and `ES256`.                                                                                                                                                              |
| Option 7             | tokenPrefix                              | string          | Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `jwt`                                                                                                                                                                                                          |
| 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              | captureNetworkPayloads                   | boolean         | Capture HTTP request/response headers and bodies for Fetch/XHR calls made during browser tests.                                                                                                                                                                                                 |
| 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": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username",
            "type": "web"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessKey": "accessKey",
            "secretKey": "secretKey",
            "type": "sigv4"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "type": "ntlm"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username",
            "type": "digest"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessTokenUrl": "accessTokenUrl",
            "tokenApiAuthentication": "header",
            "clientId": "clientId",
            "clientSecret": "clientSecret",
            "type": "oauth-client"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessTokenUrl": "accessTokenUrl",
            "password": "password",
            "tokenApiAuthentication": "header",
            "username": "username",
            "type": "oauth-rop"
          }
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
  "name": "Example-Synthetic",
  "options": {
    "tick_every": 60
  },
  "subtype": "multi",
  "type": "api"
}
```

##### 

```json
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username"
          }
        },
        "subtype": "http"
      },
      {
        "subtype": "playSubTest",
        "subtestPublicId": "123-abc-456",
        "name": "subtest step"
      }
    ]
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
  "name": "Example-Synthetic",
  "options": {
    "tick_every": 60
  },
  "subtype": "multi",
  "type": "api"
}
```

##### 

```json
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 1,
        "type": "grpcHealthcheckStatus"
      },
      {
        "operator": "is",
        "target": "proto target",
        "type": "grpcProto"
      },
      {
        "operator": "is",
        "target": "123",
        "property": "property",
        "type": "grpcMetadata"
      }
    ],
    "request": {
      "host": "localhost",
      "port": 50051,
      "service": "Hello",
      "method": "GET",
      "message": "",
      "metadata": {}
    }
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_grpc_test_payload.json",
  "name": "Example-Synthetic",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "monitor_name": "Example-Synthetic",
    "tick_every": 60
  },
  "subtype": "grpc",
  "tags": [
    "testing:api"
  ],
  "type": "api"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns the created test details.
{% 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.                                                                                                                                                                                                                                             |
| basicAuth            | Option 7                                 | object          | Object to handle JWT authentication when performing the test.                                                                                                                                                                                                                                   |
| Option 7             | addClaims                                | object          | Standard JWT claims to automatically inject.                                                                                                                                                                                                                                                    |
| addClaims            | exp                                      | boolean         | Whether to inject the `exp` (expiration) claim.                                                                                                                                                                                                                                                 |
| addClaims            | iat                                      | boolean         | Whether to inject the `iat` (issued at) claim.                                                                                                                                                                                                                                                  |
| Option 7             | algorithm [*required*]              | enum            | Algorithm to use for the JWT authentication. Allowed enum values: `HS256,RS256,ES256`                                                                                                                                                                                                           |
| Option 7             | expiresIn                                | int64           | Token time-to-live in seconds.                                                                                                                                                                                                                                                                  |
| Option 7             | header                                   | string          | Custom JWT header as a JSON string.                                                                                                                                                                                                                                                             |
| Option 7             | payload [*required*]                | string          | JWT claims as a JSON string.                                                                                                                                                                                                                                                                    |
| Option 7             | secret [*required*]                 | string          | Signing key for the JWT authentication. Use the shared secret for `HS256` or the private key (PEM format) for `RS256` and `ES256`.                                                                                                                                                              |
| Option 7             | tokenPrefix                              | string          | Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `jwt`                                                                                                                                                                                                          |
| 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.                                                                                                                                                                                                                                             |
| basicAuth            | Option 7                                 | object          | Object to handle JWT authentication when performing the test.                                                                                                                                                                                                                                   |
| Option 7             | addClaims                                | object          | Standard JWT claims to automatically inject.                                                                                                                                                                                                                                                    |
| addClaims            | exp                                      | boolean         | Whether to inject the `exp` (expiration) claim.                                                                                                                                                                                                                                                 |
| addClaims            | iat                                      | boolean         | Whether to inject the `iat` (issued at) claim.                                                                                                                                                                                                                                                  |
| Option 7             | algorithm [*required*]              | enum            | Algorithm to use for the JWT authentication. Allowed enum values: `HS256,RS256,ES256`                                                                                                                                                                                                           |
| Option 7             | expiresIn                                | int64           | Token time-to-live in seconds.                                                                                                                                                                                                                                                                  |
| Option 7             | header                                   | string          | Custom JWT header as a JSON string.                                                                                                                                                                                                                                                             |
| Option 7             | payload [*required*]                | string          | JWT claims as a JSON string.                                                                                                                                                                                                                                                                    |
| Option 7             | secret [*required*]                 | string          | Signing key for the JWT authentication. Use the shared secret for `HS256` or the private key (PEM format) for `RS256` and `ES256`.                                                                                                                                                              |
| Option 7             | tokenPrefix                              | string          | Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `jwt`                                                                                                                                                                                                          |
| 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              | captureNetworkPayloads                   | boolean         | Capture HTTP request/response headers and bodies for Fetch/XHR calls made during browser tests.                                                                                                                                                                                                 |
| 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": [],
    "captureNetworkPayloads": false,
    "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 - Creation failed
{% 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="402" %}
Test quota is reached
{% 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="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

##### 
                          \## Create an API test.
# Example of an API test.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF \## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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 
                        
##### 
                          \## Create an API test.
# Example of an API test.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF \## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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 
                        
##### 
                          \## Create an API test.
# Example of an API test.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF \## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v1/synthetics/tests/api" \
-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
// Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." 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() {
	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Steps: []datadogV1.SyntheticsAPIStep{
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
									Type:     datadogV1.SYNTHETICSBASICAUTHWEBTYPE_WEB.Ptr(),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthSigv4: &datadogV1.SyntheticsBasicAuthSigv4{
									AccessKey: "accessKey",
									SecretKey: "secretKey",
									Type:      datadogV1.SYNTHETICSBASICAUTHSIGV4TYPE_SIGV4,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthNTLM: &datadogV1.SyntheticsBasicAuthNTLM{
									Type: datadogV1.SYNTHETICSBASICAUTHNTLMTYPE_NTLM,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthDigest: &datadogV1.SyntheticsBasicAuthDigest{
									Password: "password",
									Username: "username",
									Type:     datadogV1.SYNTHETICSBASICAUTHDIGESTTYPE_DIGEST,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthOauthClient: &datadogV1.SyntheticsBasicAuthOauthClient{
									AccessTokenUrl:         "accessTokenUrl",
									TokenApiAuthentication: datadogV1.SYNTHETICSBASICAUTHOAUTHTOKENAPIAUTHENTICATION_HEADER,
									ClientId:               "clientId",
									ClientSecret:           "clientSecret",
									Type:                   datadogV1.SYNTHETICSBASICAUTHOAUTHCLIENTTYPE_OAUTH_CLIENT,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthOauthROP: &datadogV1.SyntheticsBasicAuthOauthROP{
									AccessTokenUrl:         "accessTokenUrl",
									Password:               "password",
									TokenApiAuthentication: datadogV1.SYNTHETICSBASICAUTHOAUTHTOKENAPIAUTHENTICATION_HEADER,
									Username:               "username",
									Type:                   datadogV1.SYNTHETICSBASICAUTHOAUTHROPTYPE_OAUTH_ROP,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			TickEvery: datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_MULTI.Ptr(),
		Type:    datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsAPITest(ctx, body)

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

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

##### 

```go
// Create a multistep test with subtest 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{
			Steps: []datadogV1.SyntheticsAPIStep{
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPISubtestStep: &datadogV1.SyntheticsAPISubtestStep{
						Subtype:         datadogV1.SYNTHETICSAPISUBTESTSTEPSUBTYPE_PLAY_SUB_TEST,
						SubtestPublicId: SyntheticsAPITestPublicID,
						Name:            "subtest step",
					}},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			TickEvery: datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_MULTI.Ptr(),
		Type:    datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsAPITest(ctx, body)

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

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

##### 

```go
// Create an API GRPC test returns "OK - Returns the created test details." 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() {
	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(1)},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_HEALTHCHECK_STATUS,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("proto target")},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_PROTO,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("123")},
						Property: datadog.PtrString("property"),
						Type:     datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_METADATA,
					}},
			},
			Request: &datadogV1.SyntheticsTestRequest{
				Host: datadog.PtrString("localhost"),
				Port: &datadogV1.SyntheticsTestRequestPort{
					SyntheticsTestRequestNumericalPort: datadog.PtrInt64(50051)},
				Service:  datadog.PtrString("Hello"),
				Method:   datadog.PtrString("GET"),
				Message:  datadog.PtrString(""),
				Metadata: map[string]string{},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_grpc_test_payload.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			MinFailureDuration: datadog.PtrInt64(0),
			MinLocationFailed:  datadog.PtrInt64(1),
			MonitorOptions: &datadogV1.SyntheticsTestOptionsMonitorOptions{
				RenotifyInterval: datadog.PtrInt64(0),
			},
			MonitorName: datadog.PtrString("Example-Synthetic"),
			TickEvery:   datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_GRPC.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.CreateSyntheticsAPITest(ctx, body)

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

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsAPITest`:\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
// Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test
// details." 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.SyntheticsAPIStep;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestStep;
import com.datadog.api.client.v1.model.SyntheticsAPITestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
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.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthDigest;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthDigestType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthNTLM;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthNTLMType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthClient;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthClientType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthROP;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthROPType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthTokenApiAuthentication;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthSigv4;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthSigv4Type;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Arrays;
import java.util.Collections;

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

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .steps(
                        Arrays.asList(
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username"))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username")
                                                        .type(SyntheticsBasicAuthWebType.WEB))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthSigv4()
                                                        .accessKey("accessKey")
                                                        .secretKey("secretKey")
                                                        .type(SyntheticsBasicAuthSigv4Type.SIGV4))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthNTLM()
                                                        .type(SyntheticsBasicAuthNTLMType.NTLM))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthDigest()
                                                        .password("password")
                                                        .username("username")
                                                        .type(
                                                            SyntheticsBasicAuthDigestType.DIGEST))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthOauthClient()
                                                        .accessTokenUrl("accessTokenUrl")
                                                        .tokenApiAuthentication(
                                                            SyntheticsBasicAuthOauthTokenApiAuthentication
                                                                .HEADER)
                                                        .clientId("clientId")
                                                        .clientSecret("clientSecret")
                                                        .type(
                                                            SyntheticsBasicAuthOauthClientType
                                                                .OAUTH_CLIENT))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthOauthROP()
                                                        .accessTokenUrl("accessTokenUrl")
                                                        .password("password")
                                                        .tokenApiAuthentication(
                                                            SyntheticsBasicAuthOauthTokenApiAuthentication
                                                                .HEADER)
                                                        .username("username")
                                                        .type(
                                                            SyntheticsBasicAuthOauthROPType
                                                                .OAUTH_ROP))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)))))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message(
                "BDD test payload:"
                    + " synthetics_api_test_multi_step_with_every_type_of_basic_auth.json")
            .name("Example-Synthetic")
            .options(new SyntheticsTestOptions().tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.MULTI)
            .type(SyntheticsAPITestType.API);

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

##### 

```java
// Create a multistep test with subtest 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.SyntheticsAPIStep;
import com.datadog.api.client.v1.model.SyntheticsAPISubtestStep;
import com.datadog.api.client.v1.model.SyntheticsAPISubtestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestStep;
import com.datadog.api.client.v1.model.SyntheticsAPITestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
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.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Arrays;
import java.util.Collections;

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()
                    .steps(
                        Arrays.asList(
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username"))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPISubtestStep()
                                    .subtype(SyntheticsAPISubtestStepSubtype.PLAY_SUB_TEST)
                                    .subtestPublicId(SYNTHETICS_API_TEST_PUBLIC_ID)
                                    .name("subtest step")))))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_test_multi_step_with_subtest.json")
            .name("Example-Synthetic")
            .options(new SyntheticsTestOptions().tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.MULTI)
            .type(SyntheticsAPITestType.API);

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

##### 

```java
// Create an API GRPC test returns "OK - Returns the created test details." 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.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.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsMonitorOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import com.datadog.api.client.v1.model.SyntheticsTestRequestPort;
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);

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .assertions(
                        Arrays.asList(
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue(1.0))
                                    .type(SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue("proto target"))
                                    .type(SyntheticsAssertionType.GRPC_PROTO)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue("123"))
                                    .property("property")
                                    .type(SyntheticsAssertionType.GRPC_METADATA))))
                    .request(
                        new SyntheticsTestRequest()
                            .host("localhost")
                            .port(new SyntheticsTestRequestPort(50051L))
                            .service("Hello")
                            .method("GET")
                            .message("")
                            .metadata(Map.ofEntries())))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_grpc_test_payload.json")
            .name("Example-Synthetic")
            .options(
                new SyntheticsTestOptions()
                    .minFailureDuration(0L)
                    .minLocationFailed(1L)
                    .monitorOptions(new SyntheticsTestOptionsMonitorOptions().renotifyInterval(0L))
                    .monitorName("Example-Synthetic")
                    .tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.GRPC)
            .tags(Collections.singletonList("testing:api"))
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsAPITest");
      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
"""
Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
"""

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_step import SyntheticsAPITestStep
from datadog_api_client.v1.model.synthetics_api_test_step_subtype import SyntheticsAPITestStepSubtype
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
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_basic_auth_digest import SyntheticsBasicAuthDigest
from datadog_api_client.v1.model.synthetics_basic_auth_digest_type import SyntheticsBasicAuthDigestType
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm import SyntheticsBasicAuthNTLM
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm_type import SyntheticsBasicAuthNTLMType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client import SyntheticsBasicAuthOauthClient
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client_type import SyntheticsBasicAuthOauthClientType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop import SyntheticsBasicAuthOauthROP
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop_type import SyntheticsBasicAuthOauthROPType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_token_api_authentication import (
    SyntheticsBasicAuthOauthTokenApiAuthentication,
)
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4 import SyntheticsBasicAuthSigv4
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4_type import SyntheticsBasicAuthSigv4Type
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        steps=[
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                        type=SyntheticsBasicAuthWebType.WEB,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthSigv4(
                        access_key="accessKey",
                        secret_key="secretKey",
                        type=SyntheticsBasicAuthSigv4Type.SIGV4,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthNTLM(
                        type=SyntheticsBasicAuthNTLMType.NTLM,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthDigest(
                        password="password",
                        username="username",
                        type=SyntheticsBasicAuthDigestType.DIGEST,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthOauthClient(
                        access_token_url="accessTokenUrl",
                        token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
                        client_id="clientId",
                        client_secret="clientSecret",
                        type=SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthOauthROP(
                        access_token_url="accessTokenUrl",
                        password="password",
                        token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
                        username="username",
                        type=SyntheticsBasicAuthOauthROPType.OAUTH_ROP,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
        ],
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.MULTI,
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(body=body)

    print(response)
```

##### 

```python
"""
Create a multistep test with subtest 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_subtest_step import SyntheticsAPISubtestStep
from datadog_api_client.v1.model.synthetics_api_subtest_step_subtype import SyntheticsAPISubtestStepSubtype
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_step import SyntheticsAPITestStep
from datadog_api_client.v1.model.synthetics_api_test_step_subtype import SyntheticsAPITestStepSubtype
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
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_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

# 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(
        steps=[
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPISubtestStep(
                subtype=SyntheticsAPISubtestStepSubtype.PLAY_SUB_TEST,
                subtest_public_id=SYNTHETICS_API_TEST_PUBLIC_ID,
                name="subtest step",
            ),
        ],
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.MULTI,
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(body=body)

    print(response)
```

##### 

```python
"""
Create an API GRPC test returns "OK - Returns the created test details." response
"""

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_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_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        assertions=[
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target=1,
                type=SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target="proto target",
                type=SyntheticsAssertionType.GRPC_PROTO,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target="123",
                _property="property",
                type=SyntheticsAssertionType.GRPC_METADATA,
            ),
        ],
        request=SyntheticsTestRequest(
            host="localhost",
            port=50051,
            service="Hello",
            method="GET",
            message="",
            metadata=SyntheticsTestMetadata(),
        ),
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_grpc_test_payload.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        min_failure_duration=0,
        min_location_failed=1,
        monitor_options=SyntheticsTestOptionsMonitorOptions(
            renotify_interval=0,
        ),
        monitor_name="Example-Synthetic",
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.GRPC,
    tags=[
        "testing:api",
    ],
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(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
# Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response

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

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    steps: [
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthSigv4.new({
            access_key: "accessKey",
            secret_key: "secretKey",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthSigv4Type::SIGV4,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthNTLM.new({
            type: DatadogAPIClient::V1::SyntheticsBasicAuthNTLMType::NTLM,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthDigest.new({
            password: "password",
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthDigestType::DIGEST,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient.new({
            access_token_url: "accessTokenUrl",
            token_api_authentication: DatadogAPIClient::V1::SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
            client_id: "clientId",
            client_secret: "clientSecret",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthROP.new({
            access_token_url: "accessTokenUrl",
            password: "password",
            token_api_authentication: DatadogAPIClient::V1::SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthOauthROPType::OAUTH_ROP,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
    ],
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(body)
```

##### 

```ruby
# Create a multistep test with subtest 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({
    steps: [
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPISubtestStep.new({
        subtype: DatadogAPIClient::V1::SyntheticsAPISubtestStepSubtype::PLAY_SUB_TEST,
        subtest_public_id: SYNTHETICS_API_TEST_PUBLIC_ID,
        name: "subtest step",
      }),
    ],
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(body)
```

##### 

```ruby
# Create an API GRPC test returns "OK - Returns the created test details." response

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

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    assertions: [
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: 1,
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_HEALTHCHECK_STATUS,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: "proto target",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_PROTO,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: "123",
        property: "property",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_METADATA,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      host: "localhost",
      port: 50051,
      service: "Hello",
      method: "GET",
      message: "",
      metadata: {},
    }),
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_grpc_test_payload.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    min_failure_duration: 0,
    min_location_failed: 1,
    monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
      renotify_interval: 0,
    }),
    monitor_name: "Example-Synthetic",
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::GRPC,
  tags: [
    "testing:api",
  ],
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(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
// Create a multi-step api test with every type of basicAuth returns "OK - Returns
// the created test details." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPIStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
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::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthDigest;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthDigestType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthNTLM;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthNTLMType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthClient;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthClientType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthROP;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthROPType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthSigv4;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthSigv4Type;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWebType;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;

#[tokio::main]
async fn main() {
    let body = SyntheticsAPITest::new(
        SyntheticsAPITestConfig::new().steps(vec![
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .type_(SyntheticsBasicAuthWebType::WEB)
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthSigv4(Box::new(
                        SyntheticsBasicAuthSigv4::new(
                            "accessKey".to_string(),
                            "secretKey".to_string(),
                            SyntheticsBasicAuthSigv4Type::SIGV4,
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthNTLM(Box::new(
                        SyntheticsBasicAuthNTLM::new(SyntheticsBasicAuthNTLMType::NTLM),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthDigest(Box::new(
                        SyntheticsBasicAuthDigest::new(
                            "password".to_string(),
                            SyntheticsBasicAuthDigestType::DIGEST,
                            "username".to_string(),
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient(
                        Box::new(SyntheticsBasicAuthOauthClient::new(
                            "accessTokenUrl".to_string(),
                            "clientId".to_string(),
                            "clientSecret".to_string(),
                            SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
                            SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT,
                        )),
                    ))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthROP(Box::new(
                        SyntheticsBasicAuthOauthROP::new(
                            "accessTokenUrl".to_string(),
                            "password".to_string(),
                            SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
                            SyntheticsBasicAuthOauthROPType::OAUTH_ROP,
                            "username".to_string(),
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
        ]),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json"
            .to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new().tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::MULTI);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a multistep test with subtest returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPIStep;
use datadog_api_client::datadogV1::model::SyntheticsAPISubtestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPISubtestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
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::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;

#[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().steps(vec![
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPISubtestStep(Box::new(SyntheticsAPISubtestStep::new(
                "subtest step".to_string(),
                synthetics_api_test_public_id.clone(),
                SyntheticsAPISubtestStepSubtype::PLAY_SUB_TEST,
            ))),
        ]),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_test_multi_step_with_subtest.json".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new().tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::MULTI);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create an API GRPC test returns "OK - Returns the created test details."
// 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::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::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsMonitorOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestPort;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    let body = SyntheticsAPITest::new(
        SyntheticsAPITestConfig::new()
            .assertions(vec![
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            1.0 as f64,
                        ),
                        SyntheticsAssertionType::GRPC_HEALTHCHECK_STATUS,
                    ),
                )),
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                            "proto target".to_string(),
                        ),
                        SyntheticsAssertionType::GRPC_PROTO,
                    ),
                )),
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                            "123".to_string(),
                        ),
                        SyntheticsAssertionType::GRPC_METADATA,
                    )
                    .property("property".to_string()),
                )),
            ])
            .request(
                SyntheticsTestRequest::new()
                    .host("localhost".to_string())
                    .message("".to_string())
                    .metadata(BTreeMap::from([]))
                    .method("GET".to_string())
                    .port(SyntheticsTestRequestPort::SyntheticsTestRequestNumericalPort(50051))
                    .service("Hello".to_string()),
            ),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_grpc_test_payload.json".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new()
            .min_failure_duration(0)
            .min_location_failed(1)
            .monitor_name("Example-Synthetic".to_string())
            .monitor_options(SyntheticsTestOptionsMonitorOptions::new().renotify_interval(0))
            .tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::GRPC)
    .tags(vec!["testing:api".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(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
/**
 * Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
 */

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

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

const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      steps: [
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
              type: "web",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessKey: "accessKey",
              secretKey: "secretKey",
              type: "sigv4",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              type: "ntlm",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
              type: "digest",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessTokenUrl: "accessTokenUrl",
              tokenApiAuthentication: "header",
              clientId: "clientId",
              clientSecret: "clientSecret",
              type: "oauth-client",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessTokenUrl: "accessTokenUrl",
              password: "password",
              tokenApiAuthentication: "header",
              username: "username",
              type: "oauth-rop",
            },
          },
          subtype: "http",
        },
      ],
    },
    locations: ["aws:us-east-2"],
    message:
      "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
    name: "Example-Synthetic",
    options: {
      tickEvery: 60,
    },
    subtype: "multi",
    type: "api",
  },
};

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

##### 

```typescript
/**
 * Create a multistep test with subtest 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.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      steps: [
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
            },
          },
          subtype: "http",
        },
        {
          subtype: "playSubTest",
          subtestPublicId: SYNTHETICS_API_TEST_PUBLIC_ID,
          name: "subtest step",
        },
      ],
    },
    locations: ["aws:us-east-2"],
    message:
      "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
    name: "Example-Synthetic",
    options: {
      tickEvery: 60,
    },
    subtype: "multi",
    type: "api",
  },
};

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

##### 

```typescript
/**
 * Create an API GRPC test returns "OK - Returns the created test details." response
 */

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

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

const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      assertions: [
        {
          operator: "is",
          target: 1,
          type: "grpcHealthcheckStatus",
        },
        {
          operator: "is",
          target: "proto target",
          type: "grpcProto",
        },
        {
          operator: "is",
          target: "123",
          property: "property",
          type: "grpcMetadata",
        },
      ],
      request: {
        host: "localhost",
        port: 50051,
        service: "Hello",
        method: "GET",
        message: "",
        metadata: {},
      },
    },
    locations: ["aws:us-east-2"],
    message: "BDD test payload: synthetics_api_grpc_test_payload.json",
    name: "Example-Synthetic",
    options: {
      minFailureDuration: 0,
      minLocationFailed: 1,
      monitorOptions: {
        renotifyInterval: 0,
      },
      monitorName: "Example-Synthetic",
      tickEvery: 60,
    },
    subtype: "grpc",
    tags: ["testing:api"],
    type: "api",
  },
};

apiInstance
  .createSyntheticsAPITest(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 %}
