---
title: "Trigger Synthetic tests"
method: POST
path: "/api/v1/synthetics/tests/trigger"
tags: ["Synthetics"]
---

# Trigger Synthetic tests

`POST /api/v1/synthetics/tests/trigger`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v1/synthetics/tests/trigger`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `synthetics_write`

Trigger a set of Synthetic tests.

## Request body

- SyntheticsTriggerBody: Object describing the Synthetic tests to trigger.
  - `tests` SyntheticsTriggerTest[], required: List of Synthetic tests.
    - `metadata` SyntheticsCIBatchMetadata: Metadata for the Synthetic tests run.
      - `ci` SyntheticsCIBatchMetadataCI: Description of the CI provider.
        - `pipeline` SyntheticsCIBatchMetadataPipeline: Description of the CI pipeline.
          - `url` string: URL of the pipeline.
        - `provider` SyntheticsCIBatchMetadataProvider: Description of the CI provider.
          - `name` string: Name of the CI provider.
      - `git` SyntheticsCIBatchMetadataGit: Git information.
        - `branch` string: Branch name.
        - `commitSha` string: The commit SHA.
    - `public_id` string, required: The public ID of the Synthetic test to trigger.

## Response `200`

OK

- SyntheticsTriggerCITestsResponse: Object containing information about the tests triggered.
  - `batch_id` string, nullable: The public ID of the batch triggered.
  - `locations` SyntheticsTriggerCITestLocation[]: List of Synthetic locations.
    - `id` integer: Unique identifier of the location.
    - `name` string: Name of the location.
  - `results` SyntheticsTriggerCITestRunResult[]: Information about the tests runs.
    - `device` string: The device ID.
    - `location` integer: The location ID of the test run.
    - `public_id` string: The public ID of the Synthetic test.
    - `result_id` string: ID of the result.
  - `triggered_check_ids` string[]: The public IDs of the Synthetic test triggered.

## Other responses

- `400`: Bad Request
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v1-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/revisions/ca5871004d26?raw)
