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

POST https://api.getpostman.com/collections/{collectionId}/requests
Content-Type: application/json

Creates a request in a collection. For a complete list of properties, refer to the **Request** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).

**Note:**

It is recommended that you pass the `name` property in the request body. If you do not, the system uses a null value. As a result, this creates a request with a blank name.


Reference: https://learning.postman.com/api-docs/api-reference/collection-items/create-collection-request

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /collections/{collectionId}/requests:
    post:
      operationId: createCollectionRequest
      summary: Create a request
      description: >
        Creates a request in a collection. For a complete list of properties,
        refer to the **Request** entry in the [Postman Collection Format
        documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).


        **Note:**


        It is recommended that you pass the `name` property in the request body.
        If you do not, the system uses a null value. As a result, this creates a
        request with a blank name.
      tags:
        - collectionItems
      parameters:
        - name: collectionId
          in: path
          description: The collection's ID.
          required: true
          schema:
            $ref: '#/components/schemas/collectionId'
        - name: folderId
          in: query
          description: >-
            The folder ID in which to create the request. By default, the system
            will create the request at the collection level.
          required: false
          schema:
            $ref: '#/components/schemas/collectionFolderId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createCollectionRequestResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessageDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessageDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateCollectionRequestRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createCollectionRequest'
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:
    collectionId:
      type: string
      title: collectionId
    collectionFolderId:
      type: string
      title: collectionFolderId
    request-method:
      type: string
      enum:
        - GET
        - PUT
        - POST
        - PATCH
        - DELETE
        - COPY
        - HEAD
        - OPTIONS
        - LINK
        - UNLINK
        - PURGE
        - LOCK
        - UNLOCK
        - PROPFIND
        - VIEW
      description: The request's HTTP method.
      title: request-method
    RequestHeaderDataItems:
      type: object
      properties:
        key:
          type: string
          description: The header's key.
        value:
          type: string
          description: The header's value.
        description:
          type: string
          description: The header's description.
      title: RequestHeaderDataItems
    request-header-data:
      type: array
      items:
        $ref: '#/components/schemas/RequestHeaderDataItems'
      description: The request's headers.
      title: request-header-data
    RequestQueryParamsItems:
      type: object
      properties:
        key:
          type: string
          description: The query parameter's key.
        value:
          type: string
          description: The query parameter's value.
        description:
          type: string
          description: The query parameter's description.
        enabled:
          type: boolean
          description: If true, the query parameter is enabled.
      title: RequestQueryParamsItems
    request-query-params:
      type: array
      items:
        $ref: '#/components/schemas/RequestQueryParamsItems'
      description: The request's query parameters.
      title: request-query-params
    CreateCollectionRequestDataMode:
      type: string
      enum:
        - raw
        - urlencoded
        - formdata
        - binary
        - graphql
      description: The request body's data mode.
      title: CreateCollectionRequestDataMode
    RequestDataItemsType:
      type: string
      enum:
        - text
        - file
      description: The form data's type.
      title: RequestDataItemsType
    RequestDataItems:
      type: object
      properties:
        key:
          type: string
          description: The form data's key.
        value:
          type: string
          description: The form data's value.
        description:
          type: string
          description: The form data's description.
        enabled:
          type: boolean
          description: If true, the form data entry is enabled.
        type:
          $ref: '#/components/schemas/RequestDataItemsType'
          description: The form data's type.
        uuid:
          type: string
          description: The form data entry's unique identifier.
      title: RequestDataItems
    request-data:
      type: array
      items:
        $ref: '#/components/schemas/RequestDataItems'
      description: The request body's form data.
      title: request-data
    request-graphql-mode-data:
      type: object
      properties:
        query:
          type: string
          description: The GraphQL query.
        variables:
          type: string
          description: The GraphQL query variables, in JSON format.
      description: The request body's GraphQL mode data.
      title: request-graphql-mode-data
    RequestDataOptionsRaw:
      type: object
      properties:
        language:
          type: string
          description: The raw mode data's language type.
      description: Options for the `raw` data mode.
      title: RequestDataOptionsRaw
    RequestDataOptionsUrlencoded:
      type: object
      properties: {}
      description: Options for the `urlencoded` data mode.
      title: RequestDataOptionsUrlencoded
    RequestDataOptionsParams:
      type: object
      properties: {}
      description: Options for the `params` data mode.
      title: RequestDataOptionsParams
    RequestDataOptionsBinary:
      type: object
      properties: {}
      description: Options for the `binary` data mode.
      title: RequestDataOptionsBinary
    RequestDataOptionsGraphql:
      type: object
      properties: {}
      description: Options for the `graphql` data mode.
      title: RequestDataOptionsGraphql
    request-data-options:
      type: object
      properties:
        raw:
          $ref: '#/components/schemas/RequestDataOptionsRaw'
          description: Options for the `raw` data mode.
        urlencoded:
          $ref: '#/components/schemas/RequestDataOptionsUrlencoded'
          description: Options for the `urlencoded` data mode.
        params:
          $ref: '#/components/schemas/RequestDataOptionsParams'
          description: Options for the `params` data mode.
        binary:
          $ref: '#/components/schemas/RequestDataOptionsBinary'
          description: Options for the `binary` data mode.
        graphql:
          $ref: '#/components/schemas/RequestDataOptionsGraphql'
          description: Options for the `graphql` data mode.
      description: >-
        Additional configurations and options set for the request body's various
        data modes.
      title: request-data-options
    RequestAuthType:
      type: string
      enum:
        - basic
        - bearer
        - apikey
        - digest
        - oauth1
        - oauth2
        - hawk
        - awsv4
        - ntlm
        - edgegrid
        - jwt
        - asap
        - noauth
      description: The authorization type.
      title: RequestAuthType
    AuthAttributeValueOneOf1Items:
      type: object
      properties: {}
      title: AuthAttributeValueOneOf1Items
    AuthAttributeValue1:
      type: array
      items:
        $ref: '#/components/schemas/AuthAttributeValueOneOf1Items'
      title: AuthAttributeValue1
    AuthAttributeValue:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/AuthAttributeValue1'
      description: The key's value.
      title: AuthAttributeValue
    AuthAttributeType:
      type: string
      enum:
        - string
        - boolean
        - number
        - array
        - object
        - any
      description: The value's type.
      title: AuthAttributeType
    auth-attribute:
      type: object
      properties:
        key:
          type: string
          description: The auth method's key value.
        value:
          $ref: '#/components/schemas/AuthAttributeValue'
          description: The key's value.
        type:
          $ref: '#/components/schemas/AuthAttributeType'
          description: The value's type.
      required:
        - key
      description: >-
        Information about the supported Postman [authorization
        type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).
      title: auth-attribute
    request-auth:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/RequestAuthType'
          description: The authorization type.
        apikey:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The API key's authentication information.
        awsv4:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for AWS Signature authentication.
        basic:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for Basic Auth.
        bearer:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for Bearer Token authentication.
        digest:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for Digest access authentication.
        edgegrid:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for Akamai Edgegrid authentication.
        hawk:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for Hawk authentication.
        ntlm:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for NTLM authentication.
        oauth1:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for OAuth1 authentication.
        oauth2:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for OAuth2 authentication.
        jwt:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for JWT authentication.
        asap:
          type: array
          items:
            $ref: '#/components/schemas/auth-attribute'
          description: The attributes for ASAP authentication.
      required:
        - type
      description: The request's authentication information.
      title: request-auth
    RequestEventsItemsListen:
      type: string
      enum:
        - test
        - prerequest
      description: The event type.
      title: RequestEventsItemsListen
    script-2:
      type: object
      properties:
        id:
          type: string
          description: The script's ID.
        type:
          type: string
          description: The type of script. For example, `text/javascript`.
        exec:
          type: array
          items:
            type: string
          description: >-
            A list of script strings, where each line represents a line of code.
            Separate lines makes it easy to track script changes.
      description: >-
        Information about the Javascript code that can be used to to perform
        setup or teardown operations in a response.
      title: script-2
    RequestEventsItems:
      type: object
      properties:
        listen:
          $ref: '#/components/schemas/RequestEventsItemsListen'
          description: The event type.
        script:
          $ref: '#/components/schemas/script-2'
      title: RequestEventsItems
    request-events:
      type: array
      items:
        $ref: '#/components/schemas/RequestEventsItems'
      description: A list of scripts configured to run when specific events occur.
      title: request-events
    createCollectionRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            The request's name. It is recommended that you pass the `name`
            property in the request body. If you do not, the system uses a null
            value. As a result, this creates a request with a blank name.
        description:
          type:
            - string
            - 'null'
          description: The request's description.
        method:
          $ref: '#/components/schemas/request-method'
        url:
          type:
            - string
            - 'null'
          description: The request's URL.
        headerData:
          $ref: '#/components/schemas/request-header-data'
        queryParams:
          $ref: '#/components/schemas/request-query-params'
        dataMode:
          $ref: '#/components/schemas/CreateCollectionRequestDataMode'
          description: The request body's data mode.
        data:
          $ref: '#/components/schemas/request-data'
        rawModeData:
          type:
            - string
            - 'null'
          description: The request body's raw mode data.
        graphqlModeData:
          $ref: '#/components/schemas/request-graphql-mode-data'
        dataOptions:
          $ref: '#/components/schemas/request-data-options'
        auth:
          $ref: '#/components/schemas/request-auth'
        events:
          $ref: '#/components/schemas/request-events'
      description: >
        Information about the request. For a complete list of properties, refer
        to the **Request** property in the [Postman Collection Format
        documentation](https://schema.postman.com/collection/json/v1.0.0/draft-07/collection.json).


        **Note:**


        It is recommended that you pass the `name` property in the request body.
        If you do not, the system uses a null value. As a result, this creates a
        request with a blank name.
      title: createCollectionRequest
    CreateCollectionRequestResponseData:
      type: object
      properties:
        id:
          type: string
          description: The request's ID.
        name:
          type: string
          description: The request's name.
        owner:
          type: string
          description: The user ID of the request's owner.
        folder:
          type:
            - string
            - 'null'
          description: Information about the request's parent folder.
        responses:
          type: array
          items:
            type: string
          description: A list of the request's responses.
        collection:
          type: string
          description: The collection ID that the request belongs to.
        responses_order:
          type: array
          items:
            type: string
          description: A list of response IDs and their order in the folder.
        createdAt:
          type: string
          format: date-time
          description: The requeset's creation date and time.
        updatedAt:
          type: string
          format: date-time
          description: The date and time at which the request was last updated.
        lastUpdatedBy:
          type: string
          description: The user ID of the user that last updated the folder.
      description: >-
        Information about the created request. For a complete list of
        properties, refer to the **Request** entry in the [Postman Collection
        Format
        documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).
      title: CreateCollectionRequestResponseData
    createCollectionRequestResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateCollectionRequestResponseData'
          description: >-
            Information about the created request. For a complete list of
            properties, refer to the **Request** entry in the [Postman
            Collection Format
            documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).
        meta:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            A Postman-specific response that contains information about the
            internal performed operation.
        model_id:
          type: string
          description: The request's ID.
        revision:
          type: number
          format: double
          description: >-
            An internal revision ID. Its value increments each time the resource
            changes. You can use this ID to track whether there were changes
            since the last time you fetched the resource.
      title: createCollectionRequestResponse
    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
    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
    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
    CreateCollectionRequestRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateCollectionRequestRequestInternalServerError
  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

### Collection Request Created



**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example GET Request",
    "owner": "12345678",
    "folder": null,
    "responses": [],
    "collection": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "responses_order": [],
    "createdAt": "2023-09-07T13:33:17.912Z",
    "updatedAt": "2023-09-07T13:33:17.912Z",
    "lastUpdatedBy": "12345678",
    "dataMode": "raw",
    "dataOptions": {
      "raw": {
        "language": "json"
      }
    },
    "description": "This is an example GET request.",
    "headerData": [],
    "headers": [
      {
        "key": "Host",
        "value": "postman-echo.com"
      },
      {
        "key": "user-agent",
        "value": "curl/7.88.1"
      },
      {
        "key": "accept",
        "value": "*/*"
      },
      {
        "key": "content-type",
        "value": "application/json"
      }
    ],
    "method": "GET",
    "queryParams": [
      {
        "description": "Optional. The user's ID.",
        "enabled": true,
        "equals": true,
        "key": "id",
        "value": "{{id}}"
      }
    ],
    "rawModeData": null,
    "url": "https://postman-echo.com/get?param=value"
  },
  "meta": {
    "action": "import",
    "model": "request"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32456338071
}
```

**SDK Code**

```python Collection Request Created
import requests

url = "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests"

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

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

print(response.json())
```

```javascript Collection Request Created
const url = 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests';
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 Collection Request Created
package main

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

func main() {

	url := "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests"

	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 Collection Request Created
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")

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 Collection Request Created
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Collection Request Created
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Collection Request Created
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")! 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 Request



**Request**

```json
{
  "name": "Example GET Request",
  "description": "This is an example GET request.",
  "method": "GET",
  "url": "https://postman-echo.com/get?param=value",
  "queryParams": [
    {
      "key": "id",
      "value": "{{id}}",
      "description": "Optional. The user's ID.",
      "enabled": true,
      "equals": true
    }
  ],
  "dataMode": "raw",
  "rawModeData": null,
  "dataOptions": {
    "raw": {
      "language": "json"
    }
  },
  "headers": [
    {
      "key": "Host",
      "value": "postman-echo.com"
    },
    {
      "key": "user-agent",
      "value": "curl/7.88.1"
    },
    {
      "key": "accept",
      "value": "*/*"
    },
    {
      "key": "content-type",
      "value": "application/json"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example GET Request",
    "owner": "12345678",
    "folder": null,
    "responses": [],
    "collection": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "responses_order": [],
    "createdAt": "2023-09-07T13:33:17.912Z",
    "updatedAt": "2023-09-07T13:33:17.912Z",
    "lastUpdatedBy": "12345678",
    "dataMode": "raw",
    "dataOptions": {
      "raw": {
        "language": "json"
      }
    },
    "description": "This is an example GET request.",
    "headerData": [],
    "headers": [
      {
        "key": "Host",
        "value": "postman-echo.com"
      },
      {
        "key": "user-agent",
        "value": "curl/7.88.1"
      },
      {
        "key": "accept",
        "value": "*/*"
      },
      {
        "key": "content-type",
        "value": "application/json"
      }
    ],
    "method": "GET",
    "queryParams": [
      {
        "description": "Optional. The user's ID.",
        "enabled": true,
        "equals": true,
        "key": "id",
        "value": "{{id}}"
      }
    ],
    "rawModeData": null,
    "url": "https://postman-echo.com/get?param=value"
  },
  "meta": {
    "action": "import",
    "model": "request"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32456338071
}
```

**SDK Code**

```python Create Request
import requests

url = "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests"

payload = {
    "name": "Example GET Request",
    "description": "This is an example GET request.",
    "method": "GET",
    "url": "https://postman-echo.com/get?param=value",
    "queryParams": [
        {
            "key": "id",
            "value": "{{id}}",
            "description": "Optional. The user's ID.",
            "enabled": True,
            "equals": True
        }
    ],
    "dataMode": "raw",
    "rawModeData": None,
    "dataOptions": { "raw": { "language": "json" } },
    "headers": [
        {
            "key": "Host",
            "value": "postman-echo.com"
        },
        {
            "key": "user-agent",
            "value": "curl/7.88.1"
        },
        {
            "key": "accept",
            "value": "*/*"
        },
        {
            "key": "content-type",
            "value": "application/json"
        }
    ]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create Request
const url = 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Example GET Request","description":"This is an example GET request.","method":"GET","url":"https://postman-echo.com/get?param=value","queryParams":[{"key":"id","value":"{{id}}","description":"Optional. The user\'s ID.","enabled":true,"equals":true}],"dataMode":"raw","rawModeData":null,"dataOptions":{"raw":{"language":"json"}},"headers":[{"key":"Host","value":"postman-echo.com"},{"key":"user-agent","value":"curl/7.88.1"},{"key":"accept","value":"*/*"},{"key":"content-type","value":"application/json"}]}'
};

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

```go Create Request
package main

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

func main() {

	url := "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests"

	payload := strings.NewReader("{\n  \"name\": \"Example GET Request\",\n  \"description\": \"This is an example GET request.\",\n  \"method\": \"GET\",\n  \"url\": \"https://postman-echo.com/get?param=value\",\n  \"queryParams\": [\n    {\n      \"key\": \"id\",\n      \"value\": \"{{id}}\",\n      \"description\": \"Optional. The user's ID.\",\n      \"enabled\": true,\n      \"equals\": true\n    }\n  ],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": null,\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"headers\": [\n    {\n      \"key\": \"Host\",\n      \"value\": \"postman-echo.com\"\n    },\n    {\n      \"key\": \"user-agent\",\n      \"value\": \"curl/7.88.1\"\n    },\n    {\n      \"key\": \"accept\",\n      \"value\": \"*/*\"\n    },\n    {\n      \"key\": \"content-type\",\n      \"value\": \"application/json\"\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 Request
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")

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  \"name\": \"Example GET Request\",\n  \"description\": \"This is an example GET request.\",\n  \"method\": \"GET\",\n  \"url\": \"https://postman-echo.com/get?param=value\",\n  \"queryParams\": [\n    {\n      \"key\": \"id\",\n      \"value\": \"{{id}}\",\n      \"description\": \"Optional. The user's ID.\",\n      \"enabled\": true,\n      \"equals\": true\n    }\n  ],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": null,\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"headers\": [\n    {\n      \"key\": \"Host\",\n      \"value\": \"postman-echo.com\"\n    },\n    {\n      \"key\": \"user-agent\",\n      \"value\": \"curl/7.88.1\"\n    },\n    {\n      \"key\": \"accept\",\n      \"value\": \"*/*\"\n    },\n    {\n      \"key\": \"content-type\",\n      \"value\": \"application/json\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Example GET Request\",\n  \"description\": \"This is an example GET request.\",\n  \"method\": \"GET\",\n  \"url\": \"https://postman-echo.com/get?param=value\",\n  \"queryParams\": [\n    {\n      \"key\": \"id\",\n      \"value\": \"{{id}}\",\n      \"description\": \"Optional. The user's ID.\",\n      \"enabled\": true,\n      \"equals\": true\n    }\n  ],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": null,\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"headers\": [\n    {\n      \"key\": \"Host\",\n      \"value\": \"postman-echo.com\"\n    },\n    {\n      \"key\": \"user-agent\",\n      \"value\": \"curl/7.88.1\"\n    },\n    {\n      \"key\": \"accept\",\n      \"value\": \"*/*\"\n    },\n    {\n      \"key\": \"content-type\",\n      \"value\": \"application/json\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests', [
  'body' => '{
  "name": "Example GET Request",
  "description": "This is an example GET request.",
  "method": "GET",
  "url": "https://postman-echo.com/get?param=value",
  "queryParams": [
    {
      "key": "id",
      "value": "{{id}}",
      "description": "Optional. The user\'s ID.",
      "enabled": true,
      "equals": true
    }
  ],
  "dataMode": "raw",
  "rawModeData": null,
  "dataOptions": {
    "raw": {
      "language": "json"
    }
  },
  "headers": [
    {
      "key": "Host",
      "value": "postman-echo.com"
    },
    {
      "key": "user-agent",
      "value": "curl/7.88.1"
    },
    {
      "key": "accept",
      "value": "*/*"
    },
    {
      "key": "content-type",
      "value": "application/json"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Create Request
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Example GET Request\",\n  \"description\": \"This is an example GET request.\",\n  \"method\": \"GET\",\n  \"url\": \"https://postman-echo.com/get?param=value\",\n  \"queryParams\": [\n    {\n      \"key\": \"id\",\n      \"value\": \"{{id}}\",\n      \"description\": \"Optional. The user's ID.\",\n      \"enabled\": true,\n      \"equals\": true\n    }\n  ],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": null,\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"headers\": [\n    {\n      \"key\": \"Host\",\n      \"value\": \"postman-echo.com\"\n    },\n    {\n      \"key\": \"user-agent\",\n      \"value\": \"curl/7.88.1\"\n    },\n    {\n      \"key\": \"accept\",\n      \"value\": \"*/*\"\n    },\n    {\n      \"key\": \"content-type\",\n      \"value\": \"application/json\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Request
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Example GET Request",
  "description": "This is an example GET request.",
  "method": "GET",
  "url": "https://postman-echo.com/get?param=value",
  "queryParams": [
    [
      "key": "id",
      "value": "{{id}}",
      "description": "Optional. The user's ID.",
      "enabled": true,
      "equals": true
    ]
  ],
  "dataMode": "raw",
  "rawModeData": ,
  "dataOptions": ["raw": ["language": "json"]],
  "headers": [
    [
      "key": "Host",
      "value": "postman-echo.com"
    ],
    [
      "key": "user-agent",
      "value": "curl/7.88.1"
    ],
    [
      "key": "accept",
      "value": "*/*"
    ],
    [
      "key": "content-type",
      "value": "application/json"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests")! 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()
```