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

# Update a request

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

Updates 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:**

- You must pass a collection ID (`12ece9e1-2abf-4edc-8e34-de66e74114d2`), not a collection(`12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2`), in this endpoint.
- This endpoint does not support changing the folder of a request.


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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /collections/{collectionId}/requests/{requestId}:
    put:
      operationId: updateCollectionRequest
      summary: Update a request
      description: >
        Updates 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:**


        - You must pass a collection ID
        (`12ece9e1-2abf-4edc-8e34-de66e74114d2`), not a
        collection(`12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2`), in this
        endpoint.

        - This endpoint does not support changing the folder of a request.
      tags:
        - collectionItems
      parameters:
        - name: requestId
          in: path
          description: The request's ID.
          required: true
          schema:
            $ref: '#/components/schemas/collectionRequestId'
        - name: collectionId
          in: path
          description: The collection's ID.
          required: true
          schema:
            $ref: '#/components/schemas/collectionId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateCollectionRequestResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessageDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessageDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessageDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/UpdateCollectionRequestRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateCollectionRequest'
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:
    collectionRequestId:
      type: string
      title: collectionRequestId
    collectionId:
      type: string
      title: collectionId
    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
    UpdateCollectionRequestDataMode:
      type: string
      enum:
        - raw
        - urlencoded
        - formdata
        - binary
        - graphql
      description: The request body's data mode.
      title: UpdateCollectionRequestDataMode
    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
    updateCollectionRequest:
      type: object
      properties:
        name:
          type: string
          description: The request's 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/UpdateCollectionRequestDataMode'
          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: >-
        The request properties to update. 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).
      title: updateCollectionRequest
    UpdateCollectionRequestResponseData:
      type: object
      properties:
        id:
          type: string
          description: The request's ID.
        name:
          type: string
          description: The request's name.
        description:
          type: string
          description: The request's description.
        createdAt:
          type: string
          format: date-time
          description: The request's creation date and time.
        updatedAt:
          type: string
          format: date-time
          description: The date and time at which the request was last updated.
        owner:
          type: string
          description: The user ID of the request's owner.
        lastUpdatedBy:
          type: string
          description: The user ID of the user that last updated the request.
        lastRevision:
          type: integer
          format: int64
          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.
      description: >-
        Information about the updated 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: UpdateCollectionRequestResponseData
    updateCollectionRequestResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateCollectionRequestResponseData'
          description: >-
            Information about the updated 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: updateCollectionRequestResponse
    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
    UpdateCollectionRequestRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: UpdateCollectionRequestRequestInternalServerError
  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 Updated



**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example POST Request",
    "description": "This is an example POST request.",
    "createdAt": "2023-09-01T07:59:25.000Z",
    "updatedAt": "2023-09-08T12:30:29.000Z",
    "owner": "12345678",
    "lastUpdatedBy": "12345678",
    "lastRevision": 32473087936,
    "auth": "noauth",
    "collection": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "currentHelper": null,
    "data": null,
    "dataDisabled": false,
    "dataMode": "raw",
    "dataOptions": {
      "raw": {
        "language": "json"
      }
    },
    "descriptionFormat": null,
    "events": null,
    "folder": null,
    "headerData": [],
    "headers": null,
    "helperAttributes": null,
    "method": "POST",
    "pathVariableData": [],
    "pathVariables": null,
    "preRequestScript": null,
    "protocolProfileBehavior": null,
    "queryParams": [],
    "rawModeData": "{\n    \"field\": \"Value\"\n}",
    "responses_order": [],
    "tests": null,
    "url": "https://postman-echo.com/post",
    "variables": null
  },
  "meta": {
    "action": "update",
    "model": "request"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32473098909
}
```

**SDK Code**

```python Collection Request Updated
import requests

url = "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b"

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

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

print(response.json())
```

```javascript Collection Request Updated
const url = 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b';
const options = {
  method: 'PUT',
  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 Updated
package main

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

func main() {

	url := "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b"

	req, _ := http.NewRequest("PUT", 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 Updated
require 'uri'
require 'net/http'

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

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

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

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

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

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Collection Request Updated
using RestSharp;

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

```swift Collection Request Updated
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/c82dd02c-4870-4907-8fcb-593a876cf05b")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```

### Update Request



**Request**

```json
{
  "name": "Example POST Request",
  "description": "This is an example POST request.",
  "method": "POST",
  "url": "https://postman-echo.com/post",
  "headerData": [],
  "queryParams": [],
  "dataMode": "raw",
  "rawModeData": "{\n    \"field\": \"Value\"\n}",
  "dataOptions": {
    "raw": {
      "language": "json"
    }
  },
  "collection": "c05fb60e-bb28-4e7b-9cf7-55ada6ab320c",
  "createdAt": "2023-09-01T07:59:25.000Z",
  "currentHelper": null,
  "dataDisabled": false,
  "descriptionFormat": null,
  "folder": null,
  "headers": null,
  "helperAttributes": null,
  "lastRevision": 32368133476,
  "lastUpdatedBy": "12345678",
  "oauth": "noauth",
  "owner": "12345678",
  "pathVariableData": [],
  "pathVariables": null,
  "preRequestScript": null,
  "protocolProfileBehavior": null,
  "responses_order": [],
  "tests": null,
  "updatedAt": "2023-09-01T09:29:54.000Z",
  "variables": null
}
```

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example POST Request",
    "description": "This is an example POST request.",
    "createdAt": "2023-09-01T07:59:25.000Z",
    "updatedAt": "2023-09-08T12:30:29.000Z",
    "owner": "12345678",
    "lastUpdatedBy": "12345678",
    "lastRevision": 32473087936,
    "auth": "noauth",
    "collection": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "currentHelper": null,
    "data": null,
    "dataDisabled": false,
    "dataMode": "raw",
    "dataOptions": {
      "raw": {
        "language": "json"
      }
    },
    "descriptionFormat": null,
    "events": null,
    "folder": null,
    "headerData": [],
    "headers": null,
    "helperAttributes": null,
    "method": "POST",
    "pathVariableData": [],
    "pathVariables": null,
    "preRequestScript": null,
    "protocolProfileBehavior": null,
    "queryParams": [],
    "rawModeData": "{\n    \"field\": \"Value\"\n}",
    "responses_order": [],
    "tests": null,
    "url": "https://postman-echo.com/post",
    "variables": null
  },
  "meta": {
    "action": "update",
    "model": "request"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32473098909
}
```

**SDK Code**

```python Update Request
import requests

url = "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b"

payload = {
    "name": "Example POST Request",
    "description": "This is an example POST request.",
    "method": "POST",
    "url": "https://postman-echo.com/post",
    "headerData": [],
    "queryParams": [],
    "dataMode": "raw",
    "rawModeData": "{
    \"field\": \"Value\"
}",
    "dataOptions": { "raw": { "language": "json" } },
    "collection": "c05fb60e-bb28-4e7b-9cf7-55ada6ab320c",
    "createdAt": "2023-09-01T07:59:25.000Z",
    "currentHelper": None,
    "dataDisabled": False,
    "descriptionFormat": None,
    "folder": None,
    "headers": None,
    "helperAttributes": None,
    "lastRevision": 32368133476,
    "lastUpdatedBy": "12345678",
    "oauth": "noauth",
    "owner": "12345678",
    "pathVariableData": [],
    "pathVariables": None,
    "preRequestScript": None,
    "protocolProfileBehavior": None,
    "responses_order": [],
    "tests": None,
    "updatedAt": "2023-09-01T09:29:54.000Z",
    "variables": None
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Update Request
const url = 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Example POST Request","description":"This is an example POST request.","method":"POST","url":"https://postman-echo.com/post","headerData":[],"queryParams":[],"dataMode":"raw","rawModeData":"{\n    \"field\": \"Value\"\n}","dataOptions":{"raw":{"language":"json"}},"collection":"c05fb60e-bb28-4e7b-9cf7-55ada6ab320c","createdAt":"2023-09-01T07:59:25.000Z","currentHelper":null,"dataDisabled":false,"descriptionFormat":null,"folder":null,"headers":null,"helperAttributes":null,"lastRevision":32368133476,"lastUpdatedBy":"12345678","oauth":"noauth","owner":"12345678","pathVariableData":[],"pathVariables":null,"preRequestScript":null,"protocolProfileBehavior":null,"responses_order":[],"tests":null,"updatedAt":"2023-09-01T09:29:54.000Z","variables":null}'
};

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

```go Update Request
package main

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

func main() {

	url := "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b"

	payload := strings.NewReader("{\n  \"name\": \"Example POST Request\",\n  \"description\": \"This is an example POST request.\",\n  \"method\": \"POST\",\n  \"url\": \"https://postman-echo.com/post\",\n  \"headerData\": [],\n  \"queryParams\": [],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": \"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"collection\": \"c05fb60e-bb28-4e7b-9cf7-55ada6ab320c\",\n  \"createdAt\": \"2023-09-01T07:59:25.000Z\",\n  \"currentHelper\": null,\n  \"dataDisabled\": false,\n  \"descriptionFormat\": null,\n  \"folder\": null,\n  \"headers\": null,\n  \"helperAttributes\": null,\n  \"lastRevision\": 32368133476,\n  \"lastUpdatedBy\": \"12345678\",\n  \"oauth\": \"noauth\",\n  \"owner\": \"12345678\",\n  \"pathVariableData\": [],\n  \"pathVariables\": null,\n  \"preRequestScript\": null,\n  \"protocolProfileBehavior\": null,\n  \"responses_order\": [],\n  \"tests\": null,\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\",\n  \"variables\": null\n}")

	req, _ := http.NewRequest("PUT", 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 Update Request
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Example POST Request\",\n  \"description\": \"This is an example POST request.\",\n  \"method\": \"POST\",\n  \"url\": \"https://postman-echo.com/post\",\n  \"headerData\": [],\n  \"queryParams\": [],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": \"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"collection\": \"c05fb60e-bb28-4e7b-9cf7-55ada6ab320c\",\n  \"createdAt\": \"2023-09-01T07:59:25.000Z\",\n  \"currentHelper\": null,\n  \"dataDisabled\": false,\n  \"descriptionFormat\": null,\n  \"folder\": null,\n  \"headers\": null,\n  \"helperAttributes\": null,\n  \"lastRevision\": 32368133476,\n  \"lastUpdatedBy\": \"12345678\",\n  \"oauth\": \"noauth\",\n  \"owner\": \"12345678\",\n  \"pathVariableData\": [],\n  \"pathVariables\": null,\n  \"preRequestScript\": null,\n  \"protocolProfileBehavior\": null,\n  \"responses_order\": [],\n  \"tests\": null,\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\",\n  \"variables\": null\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Example POST Request\",\n  \"description\": \"This is an example POST request.\",\n  \"method\": \"POST\",\n  \"url\": \"https://postman-echo.com/post\",\n  \"headerData\": [],\n  \"queryParams\": [],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": \"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"collection\": \"c05fb60e-bb28-4e7b-9cf7-55ada6ab320c\",\n  \"createdAt\": \"2023-09-01T07:59:25.000Z\",\n  \"currentHelper\": null,\n  \"dataDisabled\": false,\n  \"descriptionFormat\": null,\n  \"folder\": null,\n  \"headers\": null,\n  \"helperAttributes\": null,\n  \"lastRevision\": 32368133476,\n  \"lastUpdatedBy\": \"12345678\",\n  \"oauth\": \"noauth\",\n  \"owner\": \"12345678\",\n  \"pathVariableData\": [],\n  \"pathVariables\": null,\n  \"preRequestScript\": null,\n  \"protocolProfileBehavior\": null,\n  \"responses_order\": [],\n  \"tests\": null,\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\",\n  \"variables\": null\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b', [
  'body' => '{
  "name": "Example POST Request",
  "description": "This is an example POST request.",
  "method": "POST",
  "url": "https://postman-echo.com/post",
  "headerData": [],
  "queryParams": [],
  "dataMode": "raw",
  "rawModeData": "{\\n    \\"field\\": \\"Value\\"\\n}",
  "dataOptions": {
    "raw": {
      "language": "json"
    }
  },
  "collection": "c05fb60e-bb28-4e7b-9cf7-55ada6ab320c",
  "createdAt": "2023-09-01T07:59:25.000Z",
  "currentHelper": null,
  "dataDisabled": false,
  "descriptionFormat": null,
  "folder": null,
  "headers": null,
  "helperAttributes": null,
  "lastRevision": 32368133476,
  "lastUpdatedBy": "12345678",
  "oauth": "noauth",
  "owner": "12345678",
  "pathVariableData": [],
  "pathVariables": null,
  "preRequestScript": null,
  "protocolProfileBehavior": null,
  "responses_order": [],
  "tests": null,
  "updatedAt": "2023-09-01T09:29:54.000Z",
  "variables": null
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Update Request
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/requests/c82dd02c-4870-4907-8fcb-593a876cf05b");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Example POST Request\",\n  \"description\": \"This is an example POST request.\",\n  \"method\": \"POST\",\n  \"url\": \"https://postman-echo.com/post\",\n  \"headerData\": [],\n  \"queryParams\": [],\n  \"dataMode\": \"raw\",\n  \"rawModeData\": \"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\n  \"dataOptions\": {\n    \"raw\": {\n      \"language\": \"json\"\n    }\n  },\n  \"collection\": \"c05fb60e-bb28-4e7b-9cf7-55ada6ab320c\",\n  \"createdAt\": \"2023-09-01T07:59:25.000Z\",\n  \"currentHelper\": null,\n  \"dataDisabled\": false,\n  \"descriptionFormat\": null,\n  \"folder\": null,\n  \"headers\": null,\n  \"helperAttributes\": null,\n  \"lastRevision\": 32368133476,\n  \"lastUpdatedBy\": \"12345678\",\n  \"oauth\": \"noauth\",\n  \"owner\": \"12345678\",\n  \"pathVariableData\": [],\n  \"pathVariables\": null,\n  \"preRequestScript\": null,\n  \"protocolProfileBehavior\": null,\n  \"responses_order\": [],\n  \"tests\": null,\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\",\n  \"variables\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update Request
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Example POST Request",
  "description": "This is an example POST request.",
  "method": "POST",
  "url": "https://postman-echo.com/post",
  "headerData": [],
  "queryParams": [],
  "dataMode": "raw",
  "rawModeData": "{
    \"field\": \"Value\"
}",
  "dataOptions": ["raw": ["language": "json"]],
  "collection": "c05fb60e-bb28-4e7b-9cf7-55ada6ab320c",
  "createdAt": "2023-09-01T07:59:25.000Z",
  "currentHelper": ,
  "dataDisabled": false,
  "descriptionFormat": ,
  "folder": ,
  "headers": ,
  "helperAttributes": ,
  "lastRevision": 32368133476,
  "lastUpdatedBy": "12345678",
  "oauth": "noauth",
  "owner": "12345678",
  "pathVariableData": [],
  "pathVariables": ,
  "preRequestScript": ,
  "protocolProfileBehavior": ,
  "responses_order": [],
  "tests": ,
  "updatedAt": "2023-09-01T09:29:54.000Z",
  "variables": 
] 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/c82dd02c-4870-4907-8fcb-593a876cf05b")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```