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

# Create a monitor

POST https://api.getpostman.com/monitors
Content-Type: application/json

Creates a monitor.

**Note:**

- You cannot create monitors for collections added to an API definition.
- If you do not pass the `workspace` query parameter, the system creates the monitor in the oldest personal Internal workspace you own.


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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /monitors:
    post:
      operationId: createMonitor
      summary: Create a monitor
      description: >
        Creates a monitor.


        **Note:**


        - You cannot create monitors for collections added to an API definition.

        - If you do not pass the `workspace` query parameter, the system creates
        the monitor in the oldest personal Internal workspace you own.
      tags:
        - monitors
      parameters:
        - name: workspace
          in: query
          description: The workspace's ID.
          required: true
          schema:
            $ref: '#/components/schemas/workspaceId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createUpdateMonitorResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMonitorRequestBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMonitorRequestUnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMonitorRequestForbiddenError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMonitorRequestInternalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createMonitor'
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:
    workspaceId:
      type: string
      title: workspaceId
    monitorRetry:
      type: object
      properties:
        attempts:
          type: number
          format: double
          description: >-
            The number of times to reattempt a monitor run if it fails or
            errors. This may impact your [monitor
            usage](https://learning.postman.com/docs/monitoring-your-api/monitor-usage/#view-monitor-usage).
      description: Information about the monitor's retry settings.
      title: monitorRetry
    monitorOptions:
      type: object
      properties:
        followRedirects:
          type: boolean
          description: If true, follow redirects enabled.
        requestDelay:
          type: number
          format: double
          description: The monitor's request delay value, in milliseconds.
        requestTimeout:
          type: number
          format: double
          description: The monitor's request timeout value, in milliseconds.
        strictSSL:
          type: boolean
          description: If true, strict SSL enabled.
      description: Information about the monitor's option settings.
      title: monitorOptions
    monitorSchedule:
      type: object
      properties:
        cron:
          type: string
          description: >
            The monitor's run frequency, based on the given POSIX cron pattern.
            For example:

            - Every 5 minutes — `*/5 * * * *`

            - Every 30 minutes — `*/30 * * * *`

            - Every hour — `0 */1 * * *`

            - Every 6 hours — `0 */6 * * *`

            - Every day at 5 pm — `0 17 * * *`

            - Every Monday at 12 pm — `0 12 * * MON`

            - Every weekday (Mon — Fri) at 6 am — `0 6 * * MON-FRI`
        timezone:
          type: string
          description: >-
            The monitor's
            [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
      description: Information about the monitor's schedule.
      title: monitorSchedule
    MonitorDistributionItemsRegion:
      type: string
      enum:
        - us-east
        - us-west
        - ap-southeast
        - ca-central
        - eu-central
        - sa-east
        - uk
        - us-east-staticip
        - us-west-staticip
      description: The assigned distribution region.
      title: MonitorDistributionItemsRegion
    MonitorDistributionItems:
      type: object
      properties:
        region:
          $ref: '#/components/schemas/MonitorDistributionItemsRegion'
          description: The assigned distribution region.
      title: MonitorDistributionItems
    monitorDistribution:
      type: array
      items:
        $ref: '#/components/schemas/MonitorDistributionItems'
      description: >-
        A list of the monitor's [geographic
        regions](https://learning.postman.com/docs/monitoring-your-api/setting-up-monitor/#add-regions).
      title: monitorDistribution
    MonitorNotificationsOnErrorItems:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The email address of the user to notify on monitor error.
      title: MonitorNotificationsOnErrorItems
    MonitorNotificationsOnFailureItems:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The email address of the user to notify on monitor failure.
      title: MonitorNotificationsOnFailureItems
    monitorNotifications:
      type: object
      properties:
        onError:
          type: array
          items:
            $ref: '#/components/schemas/MonitorNotificationsOnErrorItems'
        onFailure:
          type: array
          items:
            $ref: '#/components/schemas/MonitorNotificationsOnFailureItems'
      description: Information about the monitor's notification settings.
      title: monitorNotifications
    CreateMonitorMonitor:
      type: object
      properties:
        name:
          type: string
          description: The monitor's name.
        active:
          type: boolean
          default: true
          description: If true, the monitor is active and makes calls to the specified URL.
        notificationLimit:
          type: number
          format: double
          description: >-
            Stop email notifications after the given number consecutive
            failures.
        collection:
          type: string
          description: The unique ID of the monitor's associated collection.
        environment:
          type: string
          description: The unique ID of the monitor's associated environment.
        retry:
          $ref: '#/components/schemas/monitorRetry'
        options:
          $ref: '#/components/schemas/monitorOptions'
        schedule:
          $ref: '#/components/schemas/monitorSchedule'
        distribution:
          $ref: '#/components/schemas/monitorDistribution'
        notifications:
          $ref: '#/components/schemas/monitorNotifications'
      required:
        - name
        - collection
        - schedule
      description: Information about the monitor.
      title: CreateMonitorMonitor
    createMonitor:
      type: object
      properties:
        monitor:
          $ref: '#/components/schemas/CreateMonitorMonitor'
          description: Information about the monitor.
      title: createMonitor
    CreateUpdateMonitorResponseMonitor:
      type: object
      properties:
        id:
          type: string
          description: The monitor's ID.
        name:
          type: string
          description: The monitor's name.
        active:
          type: boolean
          default: true
          description: If true, the monitor is active and makes calls to the specified URL.
        uid:
          type: string
          format: uid
          description: The monitor's unique ID.
      description: Information about the monitor.
      title: CreateUpdateMonitorResponseMonitor
    createUpdateMonitorResponse:
      type: object
      properties:
        monitor:
          $ref: '#/components/schemas/CreateUpdateMonitorResponseMonitor'
          description: Information about the monitor.
      title: createUpdateMonitorResponse
    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
    CommonErrorNameMessageDetailsErrorDetails:
      oneOf:
        - type: object
          additionalProperties:
            description: Any type
        - type: array
          items:
            type: string
      description: Information about the error.
      title: CommonErrorNameMessageDetailsErrorDetails
    CommonErrorNameMessageDetailsError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
        details:
          $ref: '#/components/schemas/CommonErrorNameMessageDetailsErrorDetails'
          description: Information about the error.
      title: CommonErrorNameMessageDetailsError
    commonErrorNameMessageDetails:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageDetailsError'
      title: commonErrorNameMessageDetails
    CreateMonitorRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorNameMessage'
        - $ref: '#/components/schemas/commonErrorNameMessageDetails'
      title: CreateMonitorRequestBadRequestError
    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
    CreateMonitorRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateMonitorRequestUnauthorizedError
    CreateMonitorRequestForbiddenError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateMonitorRequestForbiddenError
    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
    CreateMonitorRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateMonitorRequestInternalServerError
  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

### Monitor Created



**Request**

```json
undefined
```

**Response**

```json
{
  "monitor": {
    "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
    "name": "Test Monitor",
    "active": true,
    "uid": "12345678-1e6b6cc1-c760-48e0-968f-4bfaeeae9af1"
  }
}
```

**SDK Code**

```python Monitor Created
import requests

url = "https://api.getpostman.com/monitors"

querystring = {"workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Monitor Created
const url = 'https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Monitor Created
package main

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

func main() {

	url := "https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Monitor Created
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

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

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

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Monitor Created
using RestSharp;

var client = new RestClient("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Monitor Created
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! 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()
```

### Create Monitor



**Request**

```json
{
  "monitor": {
    "name": "Test Monitor",
    "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "schedule": {
      "cron": "*/5 * * * *",
      "timezone": "America/Chicago"
    },
    "active": true,
    "notificationLimit": 2,
    "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
    "retry": {
      "attempts": 1
    },
    "options": {
      "followRedirects": false,
      "requestDelay": 5,
      "requestTimeout": 4000,
      "strictSSL": true
    },
    "distribution": [
      {
        "region": "us-east"
      },
      {
        "region": "ca-central"
      },
      {
        "region": "us-west"
      }
    ],
    "notifications": {
      "onError": [
        {
          "email": "taylor.lee@example.com"
        }
      ],
      "onFailure": []
    }
  }
}
```

**Response**

```json
{
  "monitor": {
    "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
    "name": "Test Monitor",
    "active": true,
    "uid": "12345678-1e6b6cc1-c760-48e0-968f-4bfaeeae9af1"
  }
}
```

**SDK Code**

```python Create Monitor
import requests

url = "https://api.getpostman.com/monitors"

querystring = {"workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

payload = { "monitor": {
        "name": "Test Monitor",
        "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
        "schedule": {
            "cron": "*/5 * * * *",
            "timezone": "America/Chicago"
        },
        "active": True,
        "notificationLimit": 2,
        "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
        "retry": { "attempts": 1 },
        "options": {
            "followRedirects": False,
            "requestDelay": 5,
            "requestTimeout": 4000,
            "strictSSL": True
        },
        "distribution": [{ "region": "us-east" }, { "region": "ca-central" }, { "region": "us-west" }],
        "notifications": {
            "onError": [{ "email": "taylor.lee@example.com" }],
            "onFailure": []
        }
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create Monitor
const url = 'https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"monitor":{"name":"Test Monitor","collection":"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2","schedule":{"cron":"*/5 * * * *","timezone":"America/Chicago"},"active":true,"notificationLimit":2,"environment":"12345678-5daabc50-8451-43f6-922d-96b403b4f28e","retry":{"attempts":1},"options":{"followRedirects":false,"requestDelay":5,"requestTimeout":4000,"strictSSL":true},"distribution":[{"region":"us-east"},{"region":"ca-central"},{"region":"us-west"}],"notifications":{"onError":[{"email":"taylor.lee@example.com"}],"onFailure":[]}}}'
};

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

```go Create Monitor
package main

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

func main() {

	url := "https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	payload := strings.NewReader("{\n  \"monitor\": {\n    \"name\": \"Test Monitor\",\n    \"collection\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n    \"schedule\": {\n      \"cron\": \"*/5 * * * *\",\n      \"timezone\": \"America/Chicago\"\n    },\n    \"active\": true,\n    \"notificationLimit\": 2,\n    \"environment\": \"12345678-5daabc50-8451-43f6-922d-96b403b4f28e\",\n    \"retry\": {\n      \"attempts\": 1\n    },\n    \"options\": {\n      \"followRedirects\": false,\n      \"requestDelay\": 5,\n      \"requestTimeout\": 4000,\n      \"strictSSL\": true\n    },\n    \"distribution\": [\n      {\n        \"region\": \"us-east\"\n      },\n      {\n        \"region\": \"ca-central\"\n      },\n      {\n        \"region\": \"us-west\"\n      }\n    ],\n    \"notifications\": {\n      \"onError\": [\n        {\n          \"email\": \"taylor.lee@example.com\"\n        }\n      ],\n      \"onFailure\": []\n    }\n  }\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Create Monitor
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"monitor\": {\n    \"name\": \"Test Monitor\",\n    \"collection\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n    \"schedule\": {\n      \"cron\": \"*/5 * * * *\",\n      \"timezone\": \"America/Chicago\"\n    },\n    \"active\": true,\n    \"notificationLimit\": 2,\n    \"environment\": \"12345678-5daabc50-8451-43f6-922d-96b403b4f28e\",\n    \"retry\": {\n      \"attempts\": 1\n    },\n    \"options\": {\n      \"followRedirects\": false,\n      \"requestDelay\": 5,\n      \"requestTimeout\": 4000,\n      \"strictSSL\": true\n    },\n    \"distribution\": [\n      {\n        \"region\": \"us-east\"\n      },\n      {\n        \"region\": \"ca-central\"\n      },\n      {\n        \"region\": \"us-west\"\n      }\n    ],\n    \"notifications\": {\n      \"onError\": [\n        {\n          \"email\": \"taylor.lee@example.com\"\n        }\n      ],\n      \"onFailure\": []\n    }\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"monitor\": {\n    \"name\": \"Test Monitor\",\n    \"collection\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n    \"schedule\": {\n      \"cron\": \"*/5 * * * *\",\n      \"timezone\": \"America/Chicago\"\n    },\n    \"active\": true,\n    \"notificationLimit\": 2,\n    \"environment\": \"12345678-5daabc50-8451-43f6-922d-96b403b4f28e\",\n    \"retry\": {\n      \"attempts\": 1\n    },\n    \"options\": {\n      \"followRedirects\": false,\n      \"requestDelay\": 5,\n      \"requestTimeout\": 4000,\n      \"strictSSL\": true\n    },\n    \"distribution\": [\n      {\n        \"region\": \"us-east\"\n      },\n      {\n        \"region\": \"ca-central\"\n      },\n      {\n        \"region\": \"us-west\"\n      }\n    ],\n    \"notifications\": {\n      \"onError\": [\n        {\n          \"email\": \"taylor.lee@example.com\"\n        }\n      ],\n      \"onFailure\": []\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'body' => '{
  "monitor": {
    "name": "Test Monitor",
    "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "schedule": {
      "cron": "*/5 * * * *",
      "timezone": "America/Chicago"
    },
    "active": true,
    "notificationLimit": 2,
    "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
    "retry": {
      "attempts": 1
    },
    "options": {
      "followRedirects": false,
      "requestDelay": 5,
      "requestTimeout": 4000,
      "strictSSL": true
    },
    "distribution": [
      {
        "region": "us-east"
      },
      {
        "region": "ca-central"
      },
      {
        "region": "us-west"
      }
    ],
    "notifications": {
      "onError": [
        {
          "email": "taylor.lee@example.com"
        }
      ],
      "onFailure": []
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Create Monitor
using RestSharp;

var client = new RestClient("https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"monitor\": {\n    \"name\": \"Test Monitor\",\n    \"collection\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n    \"schedule\": {\n      \"cron\": \"*/5 * * * *\",\n      \"timezone\": \"America/Chicago\"\n    },\n    \"active\": true,\n    \"notificationLimit\": 2,\n    \"environment\": \"12345678-5daabc50-8451-43f6-922d-96b403b4f28e\",\n    \"retry\": {\n      \"attempts\": 1\n    },\n    \"options\": {\n      \"followRedirects\": false,\n      \"requestDelay\": 5,\n      \"requestTimeout\": 4000,\n      \"strictSSL\": true\n    },\n    \"distribution\": [\n      {\n        \"region\": \"us-east\"\n      },\n      {\n        \"region\": \"ca-central\"\n      },\n      {\n        \"region\": \"us-west\"\n      }\n    ],\n    \"notifications\": {\n      \"onError\": [\n        {\n          \"email\": \"taylor.lee@example.com\"\n        }\n      ],\n      \"onFailure\": []\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Monitor
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["monitor": [
    "name": "Test Monitor",
    "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "schedule": [
      "cron": "*/5 * * * *",
      "timezone": "America/Chicago"
    ],
    "active": true,
    "notificationLimit": 2,
    "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e",
    "retry": ["attempts": 1],
    "options": [
      "followRedirects": false,
      "requestDelay": 5,
      "requestTimeout": 4000,
      "strictSSL": true
    ],
    "distribution": [["region": "us-east"], ["region": "ca-central"], ["region": "us-west"]],
    "notifications": [
      "onError": [["email": "taylor.lee@example.com"]],
      "onFailure": []
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/monitors?workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```