---
title: "Create a Network Path test"
method: POST
path: "/api/v2/synthetics/tests/network"
tags: ["Synthetics"]
---

# Create a Network Path test

`POST /api/v2/synthetics/tests/network`

## Request body

- SyntheticsNetworkTestEditRequest — Network Path test request.
  - `data` SyntheticsNetworkTestEdit, required — Data object for creating or editing a Network Path test.
    - `attributes` SyntheticsNetworkTest, required — Object containing details about a Network Path test.
      - `config` SyntheticsNetworkTestConfig, required — Configuration object for a Network Path test.
        - `assertions` SyntheticsNetworkAssertion[] — Array of assertions used for the test.
          - union — Object describing an assertion for a Network Path test.
            - SyntheticsNetworkAssertionLatency — Network latency assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionMultiNetworkHop — Multi-network hop assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionPacketLossPercentage — Packet loss percentage assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionJitter — Jitter assertion for a Network Path test.
              - …
        - `request` SyntheticsNetworkTestRequest — Object describing the request for a Network Path test.
          - `destination_service` string — An optional label displayed for the destination host in the Network Path visualization.
          - `e2e_queries` integer, required — The number of packets sent to probe the destination to measure packet loss, latency and jitter.
          - `host` string, required — Host name to query.
          - `max_ttl` integer, required — The maximum time-to-live (max number of hops) used in outgoing probe packets.
          - `port` integer — For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.
          - `source_service` string — An optional label displayed for the source host in the Network Path visualization.
          - `tcp_method` 'prefer_sack' | 'syn' | 'sack' — For TCP tests, the TCP traceroute strategy.
          - `timeout` integer — Timeout in seconds.
          - `traceroute_queries` integer, required — The number of traceroute path tracings.
      - `locations` string[], required — Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests/#agent-configuration) to test private environments.
      - `message` string, required — Notification message associated with the test.
      - `monitor_id` integer — The associated monitor ID.
      - `name` string, required — Name of the test.
      - `options` SyntheticsTestOptions, required — Object describing the extra options for a Synthetic test.
        - `min_failure_duration` integer — Minimum amount of time in failure required to trigger an alert.
        - `min_location_failed` integer — Minimum number of locations in failure required to trigger an alert.
        - `monitor_name` string — The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.
        - `monitor_options` SyntheticsTestOptionsMonitorOptions — Object containing the options for a Synthetic test as a monitor (for example, renotification).
          - `escalation_message` string — Message to include in the escalation notification.
          - `notification_preset_name` 'show_all' | 'hide_all' | 'hide_query' | 'hide_handles' | 'hide_query_and_handles' | 'show_only_snapshot' | 'hide_handles_and_footer' — The name of the preset for the notification for the monitor.
          - `renotify_interval` integer — Time interval before renotifying if the test is still failing (in minutes).
          - `renotify_occurrences` integer — The number of times to renotify if the test is still failing.
        - `monitor_priority` integer — Integer from 1 (high) to 5 (low) indicating alert severity.
        - `restricted_roles` string[] — 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.
        - `retry` SyntheticsTestOptionsRetry — Object describing the retry strategy to apply to a Synthetic test.
          - `count` integer — Number of times a test needs to be retried before marking a location as failed. Defaults to 0.
          - `interval` number, double — Time interval between retries (in milliseconds). Defaults to 300ms.
        - `scheduling` SyntheticsTestOptionsScheduling — Object containing timeframes and timezone used for advanced scheduling.
          - `timeframes` SyntheticsTestOptionsSchedulingTimeframe[], required — Array containing objects describing the scheduling pattern to apply to each day.
            - `day` integer, required — Number representing the day of the week.
            - `from` string, required — The hour of the day on which scheduling starts.
            - `to` string, required — The hour of the day on which scheduling ends.
          - `timezone` string, required — Timezone in which the timeframe is based.
        - `tick_every` integer — The frequency at which to run the Synthetic test (in seconds).
      - `public_id` string — The public ID for the test.
      - `status` 'live' | 'paused' — Define whether you want to start (`live`) or pause (`paused`) a Synthetic test.
      - `subtype` 'tcp' | 'udp' | 'icmp' — Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`.
      - `tags` string[] — Array of tags attached to the test.
      - `type` 'network', required — Type of the Synthetic test, `network`.
    - `type` 'network', required — Type of the Synthetic test, `network`.

## Response `200`

OK

- SyntheticsNetworkTestResponse — Network Path test response.
  - `data` SyntheticsNetworkTestResponseData — Network Path test response data.
    - `attributes` SyntheticsNetworkTest — Object containing details about a Network Path test.
      - `config` SyntheticsNetworkTestConfig, required — Configuration object for a Network Path test.
        - `assertions` SyntheticsNetworkAssertion[] — Array of assertions used for the test.
          - union — Object describing an assertion for a Network Path test.
            - SyntheticsNetworkAssertionLatency — Network latency assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionMultiNetworkHop — Multi-network hop assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionPacketLossPercentage — Packet loss percentage assertion for a Network Path test.
              - …
            - SyntheticsNetworkAssertionJitter — Jitter assertion for a Network Path test.
              - …
        - `request` SyntheticsNetworkTestRequest — Object describing the request for a Network Path test.
          - `destination_service` string — An optional label displayed for the destination host in the Network Path visualization.
          - `e2e_queries` integer, required — The number of packets sent to probe the destination to measure packet loss, latency and jitter.
          - `host` string, required — Host name to query.
          - `max_ttl` integer, required — The maximum time-to-live (max number of hops) used in outgoing probe packets.
          - `port` integer — For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.
          - `source_service` string — An optional label displayed for the source host in the Network Path visualization.
          - `tcp_method` 'prefer_sack' | 'syn' | 'sack' — For TCP tests, the TCP traceroute strategy.
          - `timeout` integer — Timeout in seconds.
          - `traceroute_queries` integer, required — The number of traceroute path tracings.
      - `locations` string[], required — Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests/#agent-configuration) to test private environments.
      - `message` string, required — Notification message associated with the test.
      - `monitor_id` integer — The associated monitor ID.
      - `name` string, required — Name of the test.
      - `options` SyntheticsTestOptions, required — Object describing the extra options for a Synthetic test.
        - `min_failure_duration` integer — Minimum amount of time in failure required to trigger an alert.
        - `min_location_failed` integer — Minimum number of locations in failure required to trigger an alert.
        - `monitor_name` string — The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.
        - `monitor_options` SyntheticsTestOptionsMonitorOptions — Object containing the options for a Synthetic test as a monitor (for example, renotification).
          - `escalation_message` string — Message to include in the escalation notification.
          - `notification_preset_name` 'show_all' | 'hide_all' | 'hide_query' | 'hide_handles' | 'hide_query_and_handles' | 'show_only_snapshot' | 'hide_handles_and_footer' — The name of the preset for the notification for the monitor.
          - `renotify_interval` integer — Time interval before renotifying if the test is still failing (in minutes).
          - `renotify_occurrences` integer — The number of times to renotify if the test is still failing.
        - `monitor_priority` integer — Integer from 1 (high) to 5 (low) indicating alert severity.
        - `restricted_roles` string[] — 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.
        - `retry` SyntheticsTestOptionsRetry — Object describing the retry strategy to apply to a Synthetic test.
          - `count` integer — Number of times a test needs to be retried before marking a location as failed. Defaults to 0.
          - `interval` number, double — Time interval between retries (in milliseconds). Defaults to 300ms.
        - `scheduling` SyntheticsTestOptionsScheduling — Object containing timeframes and timezone used for advanced scheduling.
          - `timeframes` SyntheticsTestOptionsSchedulingTimeframe[], required — Array containing objects describing the scheduling pattern to apply to each day.
            - `day` integer, required — Number representing the day of the week.
            - `from` string, required — The hour of the day on which scheduling starts.
            - `to` string, required — The hour of the day on which scheduling ends.
          - `timezone` string, required — Timezone in which the timeframe is based.
        - `tick_every` integer — The frequency at which to run the Synthetic test (in seconds).
      - `public_id` string — The public ID for the test.
      - `status` 'live' | 'paused' — Define whether you want to start (`live`) or pause (`paused`) a Synthetic test.
      - `subtype` 'tcp' | 'udp' | 'icmp' — Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`.
      - `tags` string[] — Array of tags attached to the test.
      - `type` 'network', required — Type of the Synthetic test, `network`.
    - `id` string — The public ID of the Network Path test.
    - `type` 'network_test' — Type of response, `network_test`.

## Other responses

- `400` — API error response.
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
