> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Run a monitor

POST https://api.getpostman.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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /monitors/{monitorId}/run:
    post:
      operationId: runMonitor
      summary: Run a monitor
      description: >
        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.
      tags:
        - monitors
      parameters:
        - name: monitorId
          in: path
          description: The monitor's ID.
          required: true
          schema:
            $ref: '#/components/schemas/monitorId'
        - name: async
          in: query
          description: >-
            If true, runs the monitor asynchronously from the created monitor
            run task. By default, the server will not respond until the task
            finishes (`false`).
          required: false
          schema:
            $ref: '#/components/schemas/async'
            default: false
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/runMonitor'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunMonitorRequestUnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunMonitorRequestForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunMonitorRequestInternalServerError'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    monitorId:
      type: string
      title: monitorId
    async:
      type: boolean
      default: false
      title: async
    monitorRunInfo:
      type: object
      properties:
        jobId:
          type: string
          description: The monitor's run job ID.
        collectionUid:
          type: string
          format: uid
          description: The unique ID of the monitor's associated collection.
        environmentUid:
          type: string
          format: uid
          description: The unique ID of the monitor's associated environment.
        monitorId:
          type: string
          description: The monitor's ID.
        name:
          type: string
          description: The monitor's name.
        status:
          type: string
          description: The monitor run's status.
        startedAt:
          type: string
          format: date-time
          description: The date and time at which the monitor run began.
        finishedAt:
          type: string
          format: date-time
          description: The date and time at which the monitor's run completed.
      description: Information about the monitor.
      title: monitorRunInfo
    MonitorRunStatsAssertions:
      type: object
      properties:
        total:
          type: number
          format: double
          description: The total number of tests performed.
        failed:
          type: number
          format: double
          description: The total number of test failures.
      description: Information about the monitor's tests.
      title: MonitorRunStatsAssertions
    MonitorRunStatsRequests:
      type: object
      properties:
        total:
          type: number
          format: double
          description: The total number of requests.
        failed:
          type: number
          format: double
          description: The number of request failures.
      description: Information about the monitor's requests.
      title: MonitorRunStatsRequests
    monitorRunStats:
      type: object
      properties:
        assertions:
          $ref: '#/components/schemas/MonitorRunStatsAssertions'
          description: Information about the monitor's tests.
        requests:
          $ref: '#/components/schemas/MonitorRunStatsRequests'
          description: Information about the monitor's requests.
        runCount:
          type: integer
          description: The number of monitor runs across the selected monitor regions.
        errorCount:
          type: integer
          description: The number of errors encountered during the monitor's run.
        abortedCount:
          type: integer
          description: The number of runs terminated.
        responseLatency:
          type: integer
          description: The total time it took to run the monitor, in milliseconds.
        responseSize:
          type: integer
          description: >-
            The total response size. This includes the runs in all the selected
            regions.
      description: Information about the monitor run's stats.
      title: monitorRunStats
    MonitorRunExecutionsItemsItem:
      type: object
      properties:
        name:
          type: string
          description: The executed item's name.
      description: Information about the executed item.
      title: MonitorRunExecutionsItemsItem
    monitorRunRequests:
      type: object
      properties:
        method:
          type: string
          description: The HTTP request method.
        url:
          type: string
          format: url
          description: The request's URL.
        body:
          type: object
          additionalProperties:
            description: Any type
          description: Information about the request body, such as Content-Length.
        headers:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Information about the request headers, such as Content-Type, Accept,
            encoding, and other information.
        timestamp:
          type: string
          description: The date and time of the request.
      description: Information about the monitor run's requests.
      title: monitorRunRequests
    monitorRunResponses:
      type: object
      properties:
        body:
          type: object
          additionalProperties:
            description: Any type
          description: Information about the request body, such as Content-Length.
        code:
          type: number
          format: double
          description: The response's HTTP status code.
        headers:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Information about the response headers, such as Content-Type,
            Accept, encoding, and other information.
        responseSize:
          type: number
          format: double
          description: The response size, in bytes.
        responseTime:
          type: number
          format: double
          description: The response time, in milliseconds.
      description: Information about the monitor run's response.
      title: monitorRunResponses
    MonitorRunErrorsItems:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: MonitorRunErrorsItems
    monitorRunErrors:
      type: array
      items:
        $ref: '#/components/schemas/MonitorRunErrorsItems'
      description: >-
        If the execution encounter errors, a list of errors and their
        information.
      title: monitorRunErrors
    MonitorRunExecutionsItems:
      type: object
      properties:
        id:
          type: number
          format: double
          description: The execution ID.
        item:
          $ref: '#/components/schemas/MonitorRunExecutionsItemsItem'
          description: Information about the executed item.
        request:
          $ref: '#/components/schemas/monitorRunRequests'
        response:
          $ref: '#/components/schemas/monitorRunResponses'
        errors:
          $ref: '#/components/schemas/monitorRunErrors'
      title: MonitorRunExecutionsItems
    monitorRunExecutions:
      type: array
      items:
        $ref: '#/components/schemas/MonitorRunExecutionsItems'
      description: Information about the monitor run's executions.
      title: monitorRunExecutions
    RunMonitorRunFailuresItems:
      type: object
      properties: {}
      title: RunMonitorRunFailuresItems
    RunMonitorRun:
      type: object
      properties:
        info:
          $ref: '#/components/schemas/monitorRunInfo'
        stats:
          $ref: '#/components/schemas/monitorRunStats'
        executions:
          $ref: '#/components/schemas/monitorRunExecutions'
        failures:
          type: array
          items:
            $ref: '#/components/schemas/RunMonitorRunFailuresItems'
          description: If the monitor run failed, information about the run's failures.
      description: >-
        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.
      title: RunMonitorRun
    runMonitor:
      type: object
      properties:
        run:
          $ref: '#/components/schemas/RunMonitorRun'
          description: >-
            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.
      title: runMonitor
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    RunMonitorRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: RunMonitorRequestUnauthorizedError
    RunMonitorRequestForbiddenError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: RunMonitorRequestForbiddenError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    RunMonitorRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: RunMonitorRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## 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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

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

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

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run';
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

	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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")

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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")
  .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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run");
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")! 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": "2025-06-17T19:50:04.019Z",
      "finishedAt": "2025-06-17T19:50:06.439Z"
    }
  }
}
```

**SDK Code**

```python Run With async Parameter
import requests

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

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

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

print(response.json())
```

```javascript Run With async Parameter
const url = 'https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run';
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

	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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")

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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")
  .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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Run With async Parameter
using RestSharp;

var client = new RestClient("https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run");
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")! 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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

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

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

print(response.json())
```

```javascript Run Exceeds 300s
const url = 'https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run';
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run"

	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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")

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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")
  .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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Run Exceeds 300s
using RestSharp;

var client = new RestClient("https://api.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run");
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.getpostman.com/monitors/1e6b6cc1-c760-48e0-968f-4bfaeeae9af1/run")! 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()
```