> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Run a monitor

POST https://api.postman.com/monitors/{monitorId}/run

Runs a monitor and returns its run results.

**Note:**

* If you pass the `async=true` query parameter, the response does not return the `stats`, `executions`, and `failures` responses. To get this information for an asynchronous run, call the GET `/monitors/{id}` endpoint.
* If the call exceeds 300 seconds, the endpoint returns an HTTP `202 Accepted` response. Use the GET `/monitors/{id}` endpoint to check the run's status in the response's `lastRun` property. To avoid this, it is recommended that you include the `async=true` query parameter when using this endpoint.

Reference: https://learning.postman.com/api-docs/api-reference/monitors/run-monitor

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Path parameters

- `monitorId` (string, required) — The monitor's ID.

### Query parameters

- `async` (boolean, optional, default: false) — If true, runs the monitor asynchronously from the created monitor run task. By default, the server will not respond until the task finishes (`false`).

## Response

### 200

Successful Response

- `run` (RunMonitorRun, optional) — Information about the monitor run. If you pass the `async=true` query parameter, the response does not return the `stats`, `executions`, and `failures` responses. To get this information for an asynchronous run, call the GET `/monitors/{id}` endpoint.

### 202

Accepted

- `run` (RunMonitor202Run, optional) — The response if the monitor's run exceeds 300 seconds. To get information about the monitor's run, call the GET `/monitors/{id}` endpoint.

## Errors

### 401 Unauthorized Error

Unauthorized

- `RunMonitorRequestUnauthorizedError`
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

### 403 Forbidden Error

Forbidden

- `RunMonitorRequestForbiddenError`
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

### 404 Not Found Error

Not Found

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### 500 Internal Server Error

Internal Server Error

- `RunMonitorRequestInternalServerError`
  - Error (Type, Title, Detail): commonErrorTypeTitleDetail
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

## Types

### RunMonitorRun

Information about the monitor run. If you pass the `async=true` query parameter, the response does not return the `stats`, `executions`, and `failures` responses. To get this information for an asynchronous run, call the GET `/monitors/{id}` endpoint.

- `info` (monitorRunInfo, optional) — Information about the monitor.
- `stats` (monitorRunStats, optional) — Information about the monitor run's stats.
- `executions` (list of monitorRunExecutionsData, optional) — Information about the monitor run's executions.
- `failures` (list of RunMonitorRunFailuresItems, optional) — If the monitor run failed, information about the run's failures.

### RunMonitor202Run

The response if the monitor's run exceeds 300 seconds. To get information about the monitor's run, call the GET `/monitors/{id}` endpoint.

- `info` (RunMonitor202RunInfo, optional) — Information about the monitor.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### commonErrorTypeTitleDetail

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### monitorRunInfo

Information about the monitor.

- `jobId` (string, optional) — The monitor's run job ID.
- `collectionUid` (string, optional) — The unique ID of the monitor's associated collection.
- `environmentUid` (string, optional) — The unique ID of the monitor's associated environment.
- `monitorId` (string, optional) — The monitor's ID.
- `name` (string, optional) — The monitor's name.
- `status` (string, optional) — The monitor run's status.
- `startedAt` (datetime, optional) — The date and time at which the monitor run began.
- `finishedAt` (datetime, optional) — The date and time at which the monitor's run completed.

### monitorRunStats

Information about the monitor run's stats.

- `assertions` (monitorRunAssertionStats, optional) — Information about the monitor's tests.
- `requests` (monitorRunRequestsStats, optional) — Information about the monitor's requests.
- `runCount` (integer, optional) — The number of monitor runs across the selected monitor regions.
- `errorCount` (integer, optional) — The number of errors encountered during the monitor's run.
- `abortedCount` (integer, optional) — The number of runs terminated.
- `responseLatency` (integer, optional) — The total time it took to run the monitor, in milliseconds.
- `responseSize` (integer, optional) — The total response size. This includes the runs in all the selected regions.

### monitorRunExecutionsData

- `id` (double, optional) — The execution ID.
- `item` (MonitorRunExecutionsDataItem, optional) — Information about the executed item.
- `request` (monitorRunRequests, optional) — Information about the monitor run's requests.
- `response` (monitorRunResponses, optional) — Information about the monitor run's response.
- `errors` (list of monitorRunErrorsData, optional) — If the execution encounter errors, a list of errors and their information.

### RunMonitorRunFailuresItems

### RunMonitor202RunInfo

Information about the monitor.

- `monitorId` (string, optional) — The monitor's ID.
- `status` (string, optional) — The monitor run's status.
- `message` (string, optional) — A message that details the monitor run's current status.

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### CommonErrorTypeTitleDetailDetail

Information about the error.

- string
- map from string to any

### monitorRunAssertionStats

Information about the monitor's tests.

- `total` (double, optional) — The total number of tests performed.
- `failed` (double, optional) — The total number of test failures.

### monitorRunRequestsStats

Information about the monitor's requests.

- `total` (double, optional) — The total number of requests.
- `failed` (double, optional) — The number of request failures.

### MonitorRunExecutionsDataItem

Information about the executed item.

- `name` (string, optional) — The executed item's name.

### monitorRunRequests

Information about the monitor run's requests.

- `method` (string, optional) — The HTTP request method.
- `url` (string, optional) — The request's URL.
- `body` (map from string to any, optional) — Information about the request body, such as Content-Length.
- `headers` (map from string to any, optional) — Information about the request headers, such as Content-Type, Accept, encoding, and other information.
- `timestamp` (string, optional) — The date and time of the request.

### monitorRunResponses

Information about the monitor run's response.

- `body` (map from string to any, optional) — Information about the request body, such as Content-Length.
- `code` (double, optional) — The response's HTTP status code.
- `headers` (map from string to any, optional) — Information about the response headers, such as Content-Type, Accept, encoding, and other information.
- `responseSize` (double, optional) — The response size, in bytes.
- `responseTime` (double, optional) — The response time, in milliseconds.

### monitorRunErrorsData

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

## Examples

### Successful Response

**Response**

```json
{
  "run": {
    "info": {
      "jobId": "1ecee76a-e14e-47c0-bddc-256bf690c407",
      "collectionUid": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "environmentUid": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
      "monitorId": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "name": "Test Monitor",
      "status": "success",
      "startedAt": "2025-06-17T19:50:04.019Z",
      "finishedAt": "2025-06-17T19:50:06.439Z"
    },
    "stats": {
      "assertions": {
        "total": 5,
        "failed": 0
      },
      "requests": {
        "total": 3,
        "failed": 0
      },
      "runCount": 3,
      "errorCount": 2,
      "abortedCount": 1,
      "responseLatency": 850,
      "responseSize": 2048
    },
    "executions": [
      {
        "id": 1,
        "item": {
          "name": "Sample POST Request"
        },
        "request": {
          "method": "POST",
          "url": "http://echo.getpostman.com/post",
          "body": {
            "contentLength": 0
          },
          "headers": {
            "Accept": "*/*",
            "Accept-Encoding": "gzip, deflate, br",
            "Cache-Control": "no-cache",
            "Connection": "keep-alive",
            "Content-Length": "0",
            "Content-Type": "application/json",
            "Host": "echo.getpostman.com",
            "Postman-Token": null,
            "User-Agent": "PostmanRuntime/7.29.0"
          },
          "timestamp": "2025-06-17T19:50:06.186Z"
        },
        "response": {
          "body": {
            "contentLength": 50
          },
          "code": 200,
          "headers": {
            "Connection": "keep-alive",
            "Content-Length": "50",
            "Content-Type": "text/plain",
            "Date": "Fri, 17 Jun 2025 19:50:06 GMT",
            "Server": null
          },
          "responseSize": 50,
          "responseTime": 49
        }
      }
    ],
    "failures": []
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

querystring = {"async":"false"}

headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false';
const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Run With async Parameter

**Response**

```json
{
  "run": {
    "info": {
      "jobId": "1ecee76a-e14e-47c0-bddc-256bf690c407",
      "collectionUid": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "environmentUid": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
      "monitorId": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "name": "Test Monitor",
      "status": "success",
      "startedAt": "2022-06-17T19:50:04.019Z",
      "finishedAt": "2022-06-17T19:50:06.439Z"
    }
  }
}
```

**SDK Code**

```python Run With async Parameter
import requests

url = "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

querystring = {"async":"false"}

headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Run With async Parameter
const url = 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false';
const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Run With async Parameter
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Run With async Parameter
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Run With async Parameter
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Run With async Parameter
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Run With async Parameter
using RestSharp;

var client = new RestClient("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Run With async Parameter
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Monitor Run Failed

**Response**

```json
{
  "run": {
    "info": {
      "jobId": "1ecee76a-e14e-47c0-bddc-256bf690c407",
      "collectionUid": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "environmentUid": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
      "monitorId": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "name": "Test Monitor",
      "status": "failed",
      "startedAt": "2022-06-17T20:00:41.659Z",
      "finishedAt": "2022-06-17T20:00:42.693Z"
    },
    "stats": {
      "assertions": {
        "total": 1,
        "failed": 1
      },
      "requests": {
        "total": 1,
        "failed": 0
      }
    },
    "executions": [
      {
        "id": 1,
        "item": {
          "name": "Sample POST Request"
        },
        "request": {
          "method": "POST",
          "url": "http://echo.getpostman.com/post",
          "body": {
            "contentLength": 0
          },
          "headers": {
            "Accept": "*/*",
            "Accept-Encoding": "gzip, deflate, br",
            "Cache-Control": "no-cache",
            "Connection": "keep-alive",
            "Content-Length": "0",
            "Content-Type": "application/json",
            "Host": "echo.getpostman.com",
            "Postman-Token": null,
            "User-Agent": "PostmanRuntime/7.29.0"
          },
          "timestamp": "2022-06-17T20:00:42.423Z"
        },
        "response": {
          "body": {
            "contentLength": 50
          },
          "code": 200,
          "headers": {
            "Connection": "keep-alive",
            "Content-Length": "50",
            "Content-Type": "text/plain",
            "Date": "Fri, 17 Jun 2022 20:00:42 GMT",
            "Server": null
          },
          "responseSize": 50,
          "responseTime": 15
        }
      }
    ],
    "failures": []
  }
}
```

**SDK Code**

```python Monitor Run Failed
import requests

url = "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

querystring = {"async":"false"}

headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Monitor Run Failed
const url = 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false';
const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Monitor Run Failed
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Monitor Run Failed
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Monitor Run Failed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Monitor Run Failed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Monitor Run Failed
using RestSharp;

var client = new RestClient("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Monitor Run Failed
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Monitor Run with Errors

**Response**

```json
{
  "run": {
    "info": {
      "jobId": "1ecee76a-e14e-47c0-bddc-256bf690c407",
      "collectionUid": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "environmentUid": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
      "monitorId": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "name": "Test Monitor",
      "status": "error",
      "startedAt": "2022-06-17T20:04:47.183Z",
      "finishedAt": "2022-06-17T20:04:48.858Z"
    },
    "stats": {
      "assertions": {
        "total": 4,
        "failed": 2
      },
      "requests": {
        "total": 4,
        "failed": 3
      }
    },
    "executions": [
      {
        "id": 1,
        "item": {
          "name": "Sample GET Request"
        },
        "request": {
          "method": "GET",
          "url": "https://example.com/search?format=json&state=&city=&country=",
          "body": {
            "contentLength": 0
          },
          "headers": {
            "Accept": "*/*",
            "Accept-Encoding": "gzip, deflate, br",
            "Cache-Control": "no-cache",
            "Connection": "keep-alive",
            "Host": "example.com",
            "Postman-Token": null,
            "User-Agent": "PostmanRuntime/7.29.0"
          },
          "timestamp": "2022-06-17T20:04:47.926Z"
        },
        "response": {
          "body": {
            "contentLength": 2
          },
          "code": 200,
          "headers": {
            "Access-Control-Allow-Methods": "OPTIONS,GET",
            "Access-Control-Allow-Origin": "*",
            "Connection": "keep-alive",
            "Content-Type": "application/json; charset=UTF-8",
            "Date": "Fri, 17 Jun 2022 20:04:47 GMT",
            "Keep-Alive": null,
            "Server": null,
            "Transfer-Encoding": "chunked"
          },
          "responseSize": 2,
          "responseTime": 257
        },
        "errors": [
          {
            "name": "m",
            "message": "Cannot read property 'lat' of undefined"
          }
        ]
      }
    ],
    "failures": [
      {
        "executionId": 1,
        "message": "Cannot read property 'lat' of undefined",
        "name": "TypeError"
      }
    ]
  }
}
```

**SDK Code**

```python Monitor Run with Errors
import requests

url = "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

querystring = {"async":"false"}

headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Monitor Run with Errors
const url = 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false';
const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Monitor Run with Errors
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Monitor Run with Errors
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Monitor Run with Errors
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Monitor Run with Errors
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Monitor Run with Errors
using RestSharp;

var client = new RestClient("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Monitor Run with Errors
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Run Exceeds 300s

**Response**

```json
{
  "run": {
    "info": {
      "monitorId": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "status": "running",
      "message": "The request is taking longer than expected, but is processing. To avoid this in future requests, pass the 'async=true' query parameter to use the async option."
    }
  }
}
```

**SDK Code**

```python Run Exceeds 300s
import requests

url = "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

querystring = {"async":"false"}

headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Run Exceeds 300s
const url = 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false';
const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Run Exceeds 300s
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Run Exceeds 300s
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Run Exceeds 300s
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Run Exceeds 300s
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Run Exceeds 300s
using RestSharp;

var client = new RestClient("https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Run Exceeds 300s
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run?async=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```