> This page is for Postman API Docs.

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

# Update a response

PUT https://api.postman.com/collections/{collectionId}/responses/{responseId}
Content-Type: application/json

Updates a response in a collection. For a complete list of properties, see 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 UID (`12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2`), in this endpoint.
- This endpoint acts like a PATCH method. It only updates the values that you pass in the request body (for example, the `name` property). The endpoint does not update the entire resource.


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

## Authentication

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

## Servers

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

## Request

### Path parameters

- `responseId` (string, required) — The response's ID.
- `collectionId` (string, required) — The collection's ID.

### Body (application/json)

This endpoint expects an updateCollectionResponse.

- `name` (string, optional) — The response's name.
- `description` (string, optional, nullable) — The response's description.
- `url` (string, optional, nullable) — The associated request's URL.
- `method` (enum, optional) — The associated request's HTTP method.
  - Allowed values: `GET`, `PUT`, `POST`, `PATCH`, `DELETE`, `COPY`, `HEAD`, `OPTIONS`, `LINK`, `UNLINK`, `PURGE`, `LOCK`, `UNLOCK`, `PROPFIND`, `VIEW`
- `headers` (list of header-2, optional) — The response's headers.
- `dataMode` (enum, optional) — The associated request body's data mode.
  - Allowed values: `raw`, `urlencoded`, `formdata`, `binary`, `graphql`
- `rawModeData` (string, optional, nullable) — The associated request body's raw mode data.
- `dataOptions` (request-data-options, optional) — Additional options for the associated request body data.
- `responseCode` (UpdateCollectionResponseResponseCode, optional) — The response's HTTP response code information.
- `status` (string, optional, nullable) — The response's HTTP status text.
- `time` (string, optional) — The time taken by the request to complete, in milliseconds.
- `cookies` (string, optional, nullable) — The response's cookie data.
- `mime` (string, optional, nullable) — The response's MIME type.
- `text` (string, optional) — The raw text of the response body.
- `language` (string, optional) — The response body's language type.
- `rawDataType` (string, optional, nullable) — The response's raw data type.
- `requestObject` (string, optional) — A JSON-stringified representation of the associated request.

## Response

### 200

Successful Response

- `data` (UpdateCollectionResponseResponseData, optional) — Information about the updated response. For a complete list of response properties, refer to the **Response** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).
- `meta` (map from string to any, optional) — A Postman-specific response that contains information about the internal performed operation.
- `model_id` (string, optional) — The response's ID.

## Errors

### 400 Bad Request Error

Bad Request

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

### 401 Unauthorized Error

Unauthorized

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

### 404 Not Found Error

Not Found

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

### 500 Internal Server Error

Internal Server Error

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

## Types

### header-2

Information about the header.

- `key` (string, required) — The header's key, such as `Content-Type` or `X-Custom-Header`.
- `value` (string, required) — The header key's value.
- `description` (string, optional, nullable) — The header's description.

### request-data-options

Additional configurations and options set for the request body's various data modes.

- `raw` (RequestDataOptionsRaw, optional) — Options for the `raw` data mode.
- `urlencoded` (RequestDataOptionsUrlencoded, optional) — Options for the `urlencoded` data mode.
- `params` (RequestDataOptionsParams, optional) — Options for the `params` data mode.
- `binary` (RequestDataOptionsBinary, optional) — Options for the `binary` data mode.
- `graphql` (RequestDataOptionsGraphql, optional) — Options for the `graphql` data mode.

### UpdateCollectionResponseResponseCode

The response's HTTP response code information.

- `code` (double, optional) — The response's HTTP response status code.
- `name` (string, optional) — The name of the status code.

### UpdateCollectionResponseResponseData

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

- `id` (string, optional) — The response's ID.
- `name` (string, optional) — The response's name.
- `owner` (string, optional) — The user ID of the response's owner.
- `createdAt` (datetime, optional) — The response's creation date and time.
- `updatedAt` (datetime, optional) — The date and time at which the response was last updated.
- `lastRevision` (long, optional) — 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.
- `lastUpdatedBy` (string, optional) — The user ID of the user that last updated the response.

### CommonErrorNameMessageDetailsError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.
- `details` (CommonErrorNameMessageDetailsErrorDetails, optional) — Information about the error.

### commonErrorTypeTitleDetail

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

### commonErrorTypeTitleDetailStatus

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

### commonErrorNameMessage

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

### RequestDataOptionsRaw

Options for the `raw` data mode.

- `language` (string, optional) — The raw mode data's language type.

### RequestDataOptionsUrlencoded

Options for the `urlencoded` data mode.

### RequestDataOptionsParams

Options for the `params` data mode.

### RequestDataOptionsBinary

Options for the `binary` data mode.

### RequestDataOptionsGraphql

Options for the `graphql` data mode.

### CommonErrorNameMessageDetailsErrorDetails

Information about the error.

- map from string to any
- list of string

### CommonErrorTypeTitleDetailDetail

Information about the error.

- string
- map from string to any

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### CommonErrorNameMessageError

Information about the error.

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

## Examples

### Successful Response

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example Response",
    "owner": "12345678",
    "createdAt": "2023-09-01T09:29:54.000Z",
    "updatedAt": "2023-09-08T12:37:33.000Z",
    "lastRevision": 32368133468,
    "lastUpdatedBy": "12345678",
    "cookies": null,
    "headers": [
      {
        "key": "Date",
        "value": "Fri, 01 Sep 2023 07:36:18 GMT"
      },
      {
        "key": "Content-Type",
        "value": "application/json; charset=utf-8"
      },
      {
        "key": "Content-Length",
        "value": "607"
      },
      {
        "key": "Connection",
        "value": "keep-alive"
      }
    ],
    "language": "json",
    "mime": null,
    "rawDataType": null,
    "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "requestObject": "{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\"graphqlModeData\":{}}",
    "responseCode": {
      "code": 200,
      "name": "OK"
    },
    "status": null,
    "text": "{\n    \"args\": {},\n    \"data\": {\n        \"field\": \"Value\"\n    },\n    \"files\": {},\n    \"form\": {},\n    \"headers\": {\n        \"x-forwarded-proto\": \"https\",\n        \"x-forwarded-port\": \"443\",\n        \"host\": \"postman-echo.com\",\n        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",\n        \"content-length\": \"24\",\n        \"content-type\": \"application/json\",\n        \"x-api-key\": \"xxx\",\n        \"user-agent\": \"PostmanRuntime/7.32.3\",\n        \"accept\": \"*/*\",\n        \"postman-token\": \"XXX\",\n        \"accept-encoding\": \"gzip, deflate, br\"\n    },\n    \"json\": {\n        \"field\": \"Value\"\n    },\n    \"url\": \"https://postman-echo.com/post\"\n}",
    "time": "50"
  },
  "meta": {
    "action": "update",
    "model": "response"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32473225008
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07"

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

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

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07';
const options = {method: 'PUT', headers: {'x-api-key': '<apiKey>'}};

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

```go Successful Response
package main

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

func main() {

	url := "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07"

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

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

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

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

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

}
```

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

url = URI("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")

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

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

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

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

HttpResponse<String> response = Unirest.put("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")
  .header("x-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")! 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 Response

**Request**

```json
{
  "name": "Example Response",
  "headers": {
    "0": {
      "key": "Date",
      "value": "Fri, 01 Sep 2023 07:36:18 GMT"
    },
    "1": {
      "key": "Content-Type",
      "value": "application/json; charset=utf-8"
    },
    "2": {
      "key": "Content-Length",
      "value": "607"
    },
    "3": {
      "key": "Connection",
      "value": "keep-alive"
    }
  },
  "responseCode": {
    "code": 200,
    "name": "OK"
  },
  "status": null,
  "time": "50",
  "cookies": null,
  "mime": null,
  "text": "{\n    \"args\": {},\n    \"data\": {\n        \"field\": \"Value\"\n    },\n    \"files\": {},\n    \"form\": {},\n    \"headers\": {\n        \"x-forwarded-proto\": \"https\",\n        \"x-forwarded-port\": \"443\",\n        \"host\": \"postman-echo.com\",\n        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",\n        \"content-length\": \"24\",\n        \"content-type\": \"application/json\",\n        \"x-api-key\": \"xxx\",\n        \"user-agent\": \"PostmanRuntime/7.32.3\",\n        \"accept\": \"*/*\",\n        \"postman-token\": \"XXX\",\n        \"accept-encoding\": \"gzip, deflate, br\"\n    },\n    \"json\": {\n        \"field\": \"Value\"\n    },\n    \"url\": \"https://postman-echo.com/post\"\n}",
  "language": "json",
  "rawDataType": null,
  "requestObject": "{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\"graphqlModeData\":{}}",
  "createdAt": "2023-09-01T09:29:54.000Z",
  "lastRevision": 32368133468,
  "lastUpdatedBy": "12345678",
  "owner": "12345678",
  "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "updatedAt": "2023-09-01T09:29:54.000Z"
}
```

**Response**

```json
{
  "data": {
    "id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "name": "Example Response",
    "owner": "12345678",
    "createdAt": "2023-09-01T09:29:54.000Z",
    "updatedAt": "2023-09-08T12:37:33.000Z",
    "lastRevision": 32368133468,
    "lastUpdatedBy": "12345678",
    "cookies": null,
    "headers": [
      {
        "key": "Date",
        "value": "Fri, 01 Sep 2023 07:36:18 GMT"
      },
      {
        "key": "Content-Type",
        "value": "application/json; charset=utf-8"
      },
      {
        "key": "Content-Length",
        "value": "607"
      },
      {
        "key": "Connection",
        "value": "keep-alive"
      }
    ],
    "language": "json",
    "mime": null,
    "rawDataType": null,
    "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "requestObject": "{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\"graphqlModeData\":{}}",
    "responseCode": {
      "code": 200,
      "name": "OK"
    },
    "status": null,
    "text": "{\n    \"args\": {},\n    \"data\": {\n        \"field\": \"Value\"\n    },\n    \"files\": {},\n    \"form\": {},\n    \"headers\": {\n        \"x-forwarded-proto\": \"https\",\n        \"x-forwarded-port\": \"443\",\n        \"host\": \"postman-echo.com\",\n        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",\n        \"content-length\": \"24\",\n        \"content-type\": \"application/json\",\n        \"x-api-key\": \"xxx\",\n        \"user-agent\": \"PostmanRuntime/7.32.3\",\n        \"accept\": \"*/*\",\n        \"postman-token\": \"XXX\",\n        \"accept-encoding\": \"gzip, deflate, br\"\n    },\n    \"json\": {\n        \"field\": \"Value\"\n    },\n    \"url\": \"https://postman-echo.com/post\"\n}",
    "time": "50"
  },
  "meta": {
    "action": "update",
    "model": "response"
  },
  "model_id": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "revision": 32473225008
}
```

**SDK Code**

```python Update Response
import requests

url = "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07"

payload = {
    "name": "Example Response",
    "headers": {
        "0": {
            "key": "Date",
            "value": "Fri, 01 Sep 2023 07:36:18 GMT"
        },
        "1": {
            "key": "Content-Type",
            "value": "application/json; charset=utf-8"
        },
        "2": {
            "key": "Content-Length",
            "value": "607"
        },
        "3": {
            "key": "Connection",
            "value": "keep-alive"
        }
    },
    "responseCode": {
        "code": 200,
        "name": "OK"
    },
    "status": None,
    "time": "50",
    "cookies": None,
    "mime": None,
    "text": "{
    \"args\": {},
    \"data\": {
        \"field\": \"Value\"
    },
    \"files\": {},
    \"form\": {},
    \"headers\": {
        \"x-forwarded-proto\": \"https\",
        \"x-forwarded-port\": \"443\",
        \"host\": \"postman-echo.com\",
        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",
        \"content-length\": \"24\",
        \"content-type\": \"application/json\",
        \"x-api-key\": \"xxx\",
        \"user-agent\": \"PostmanRuntime/7.32.3\",
        \"accept\": \"*/*\",
        \"postman-token\": \"XXX\",
        \"accept-encoding\": \"gzip, deflate, br\"
    },
    \"json\": {
        \"field\": \"Value\"
    },
    \"url\": \"https://postman-echo.com/post\"
}",
    "language": "json",
    "rawDataType": None,
    "requestObject": "{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\n    \\"field\\": \\"Value\\"\n}\",\"graphqlModeData\":{}}",
    "createdAt": "2023-09-01T09:29:54.000Z",
    "lastRevision": 32368133468,
    "lastUpdatedBy": "12345678",
    "owner": "12345678",
    "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
    "updatedAt": "2023-09-01T09:29:54.000Z"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Update Response
const url = 'https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Example Response","headers":{"0":{"key":"Date","value":"Fri, 01 Sep 2023 07:36:18 GMT"},"1":{"key":"Content-Type","value":"application/json; charset=utf-8"},"2":{"key":"Content-Length","value":"607"},"3":{"key":"Connection","value":"keep-alive"}},"responseCode":{"code":200,"name":"OK"},"status":null,"time":"50","cookies":null,"mime":null,"text":"{\n    \"args\": {},\n    \"data\": {\n        \"field\": \"Value\"\n    },\n    \"files\": {},\n    \"form\": {},\n    \"headers\": {\n        \"x-forwarded-proto\": \"https\",\n        \"x-forwarded-port\": \"443\",\n        \"host\": \"postman-echo.com\",\n        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",\n        \"content-length\": \"24\",\n        \"content-type\": \"application/json\",\n        \"x-api-key\": \"xxx\",\n        \"user-agent\": \"PostmanRuntime/7.32.3\",\n        \"accept\": \"*/*\",\n        \"postman-token\": \"XXX\",\n        \"accept-encoding\": \"gzip, deflate, br\"\n    },\n    \"json\": {\n        \"field\": \"Value\"\n    },\n    \"url\": \"https://postman-echo.com/post\"\n}","language":"json","rawDataType":null,"requestObject":"{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\\n    \\\"field\\\": \\\"Value\\\"\\n}\",\"graphqlModeData\":{}}","createdAt":"2023-09-01T09:29:54.000Z","lastRevision":32368133468,"lastUpdatedBy":"12345678","owner":"12345678","request":"c82dd02c-4870-4907-8fcb-593a876cf05b","updatedAt":"2023-09-01T09:29:54.000Z"}'
};

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

```go Update Response
package main

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

func main() {

	url := "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07"

	payload := strings.NewReader("{\n  \"name\": \"Example Response\",\n  \"headers\": {\n    \"0\": {\n      \"key\": \"Date\",\n      \"value\": \"Fri, 01 Sep 2023 07:36:18 GMT\"\n    },\n    \"1\": {\n      \"key\": \"Content-Type\",\n      \"value\": \"application/json; charset=utf-8\"\n    },\n    \"2\": {\n      \"key\": \"Content-Length\",\n      \"value\": \"607\"\n    },\n    \"3\": {\n      \"key\": \"Connection\",\n      \"value\": \"keep-alive\"\n    }\n  },\n  \"responseCode\": {\n    \"code\": 200,\n    \"name\": \"OK\"\n  },\n  \"status\": null,\n  \"time\": \"50\",\n  \"cookies\": null,\n  \"mime\": null,\n  \"text\": \"{\\n    \\\"args\\\": {},\\n    \\\"data\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"files\\\": {},\\n    \\\"form\\\": {},\\n    \\\"headers\\\": {\\n        \\\"x-forwarded-proto\\\": \\\"https\\\",\\n        \\\"x-forwarded-port\\\": \\\"443\\\",\\n        \\\"host\\\": \\\"postman-echo.com\\\",\\n        \\\"x-amzn-trace-id\\\": \\\"Root=1-64f9cd12-62f18f3a048796d345508073\\\",\\n        \\\"content-length\\\": \\\"24\\\",\\n        \\\"content-type\\\": \\\"application/json\\\",\\n        \\\"x-api-key\\\": \\\"xxx\\\",\\n        \\\"user-agent\\\": \\\"PostmanRuntime/7.32.3\\\",\\n        \\\"accept\\\": \\\"*/*\\\",\\n        \\\"postman-token\\\": \\\"XXX\\\",\\n        \\\"accept-encoding\\\": \\\"gzip, deflate, br\\\"\\n    },\\n    \\\"json\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"url\\\": \\\"https://postman-echo.com/post\\\"\\n}\",\n  \"language\": \"json\",\n  \"rawDataType\": null,\n  \"requestObject\": \"{\\\"data\\\":null,\\\"dataMode\\\":\\\"raw\\\",\\\"dataOptions\\\":{\\\"raw\\\":{\\\"language\\\":\\\"json\\\"}},\\\"headerData\\\":[],\\\"method\\\":\\\"POST\\\",\\\"pathVariableData\\\":[],\\\"queryParams\\\":[],\\\"url\\\":\\\"https://postman-echo.com/post\\\",\\\"headers\\\":\\\"\\\",\\\"pathVariables\\\":{},\\\"protocolProfileBehavior\\\":{\\\"disableBodyPruning\\\":true},\\\"rawModeData\\\":\\\"{\\\\n    \\\\\\\"field\\\\\\\": \\\\\\\"Value\\\\\\\"\\\\n}\\\",\\\"graphqlModeData\\\":{}}\",\n  \"createdAt\": \"2023-09-01T09:29:54.000Z\",\n  \"lastRevision\": 32368133468,\n  \"lastUpdatedBy\": \"12345678\",\n  \"owner\": \"12345678\",\n  \"request\": \"c82dd02c-4870-4907-8fcb-593a876cf05b\",\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\"\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 Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")

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 Response\",\n  \"headers\": {\n    \"0\": {\n      \"key\": \"Date\",\n      \"value\": \"Fri, 01 Sep 2023 07:36:18 GMT\"\n    },\n    \"1\": {\n      \"key\": \"Content-Type\",\n      \"value\": \"application/json; charset=utf-8\"\n    },\n    \"2\": {\n      \"key\": \"Content-Length\",\n      \"value\": \"607\"\n    },\n    \"3\": {\n      \"key\": \"Connection\",\n      \"value\": \"keep-alive\"\n    }\n  },\n  \"responseCode\": {\n    \"code\": 200,\n    \"name\": \"OK\"\n  },\n  \"status\": null,\n  \"time\": \"50\",\n  \"cookies\": null,\n  \"mime\": null,\n  \"text\": \"{\\n    \\\"args\\\": {},\\n    \\\"data\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"files\\\": {},\\n    \\\"form\\\": {},\\n    \\\"headers\\\": {\\n        \\\"x-forwarded-proto\\\": \\\"https\\\",\\n        \\\"x-forwarded-port\\\": \\\"443\\\",\\n        \\\"host\\\": \\\"postman-echo.com\\\",\\n        \\\"x-amzn-trace-id\\\": \\\"Root=1-64f9cd12-62f18f3a048796d345508073\\\",\\n        \\\"content-length\\\": \\\"24\\\",\\n        \\\"content-type\\\": \\\"application/json\\\",\\n        \\\"x-api-key\\\": \\\"xxx\\\",\\n        \\\"user-agent\\\": \\\"PostmanRuntime/7.32.3\\\",\\n        \\\"accept\\\": \\\"*/*\\\",\\n        \\\"postman-token\\\": \\\"XXX\\\",\\n        \\\"accept-encoding\\\": \\\"gzip, deflate, br\\\"\\n    },\\n    \\\"json\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"url\\\": \\\"https://postman-echo.com/post\\\"\\n}\",\n  \"language\": \"json\",\n  \"rawDataType\": null,\n  \"requestObject\": \"{\\\"data\\\":null,\\\"dataMode\\\":\\\"raw\\\",\\\"dataOptions\\\":{\\\"raw\\\":{\\\"language\\\":\\\"json\\\"}},\\\"headerData\\\":[],\\\"method\\\":\\\"POST\\\",\\\"pathVariableData\\\":[],\\\"queryParams\\\":[],\\\"url\\\":\\\"https://postman-echo.com/post\\\",\\\"headers\\\":\\\"\\\",\\\"pathVariables\\\":{},\\\"protocolProfileBehavior\\\":{\\\"disableBodyPruning\\\":true},\\\"rawModeData\\\":\\\"{\\\\n    \\\\\\\"field\\\\\\\": \\\\\\\"Value\\\\\\\"\\\\n}\\\",\\\"graphqlModeData\\\":{}}\",\n  \"createdAt\": \"2023-09-01T09:29:54.000Z\",\n  \"lastRevision\": 32368133468,\n  \"lastUpdatedBy\": \"12345678\",\n  \"owner\": \"12345678\",\n  \"request\": \"c82dd02c-4870-4907-8fcb-593a876cf05b\",\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\"\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Example Response\",\n  \"headers\": {\n    \"0\": {\n      \"key\": \"Date\",\n      \"value\": \"Fri, 01 Sep 2023 07:36:18 GMT\"\n    },\n    \"1\": {\n      \"key\": \"Content-Type\",\n      \"value\": \"application/json; charset=utf-8\"\n    },\n    \"2\": {\n      \"key\": \"Content-Length\",\n      \"value\": \"607\"\n    },\n    \"3\": {\n      \"key\": \"Connection\",\n      \"value\": \"keep-alive\"\n    }\n  },\n  \"responseCode\": {\n    \"code\": 200,\n    \"name\": \"OK\"\n  },\n  \"status\": null,\n  \"time\": \"50\",\n  \"cookies\": null,\n  \"mime\": null,\n  \"text\": \"{\\n    \\\"args\\\": {},\\n    \\\"data\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"files\\\": {},\\n    \\\"form\\\": {},\\n    \\\"headers\\\": {\\n        \\\"x-forwarded-proto\\\": \\\"https\\\",\\n        \\\"x-forwarded-port\\\": \\\"443\\\",\\n        \\\"host\\\": \\\"postman-echo.com\\\",\\n        \\\"x-amzn-trace-id\\\": \\\"Root=1-64f9cd12-62f18f3a048796d345508073\\\",\\n        \\\"content-length\\\": \\\"24\\\",\\n        \\\"content-type\\\": \\\"application/json\\\",\\n        \\\"x-api-key\\\": \\\"xxx\\\",\\n        \\\"user-agent\\\": \\\"PostmanRuntime/7.32.3\\\",\\n        \\\"accept\\\": \\\"*/*\\\",\\n        \\\"postman-token\\\": \\\"XXX\\\",\\n        \\\"accept-encoding\\\": \\\"gzip, deflate, br\\\"\\n    },\\n    \\\"json\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"url\\\": \\\"https://postman-echo.com/post\\\"\\n}\",\n  \"language\": \"json\",\n  \"rawDataType\": null,\n  \"requestObject\": \"{\\\"data\\\":null,\\\"dataMode\\\":\\\"raw\\\",\\\"dataOptions\\\":{\\\"raw\\\":{\\\"language\\\":\\\"json\\\"}},\\\"headerData\\\":[],\\\"method\\\":\\\"POST\\\",\\\"pathVariableData\\\":[],\\\"queryParams\\\":[],\\\"url\\\":\\\"https://postman-echo.com/post\\\",\\\"headers\\\":\\\"\\\",\\\"pathVariables\\\":{},\\\"protocolProfileBehavior\\\":{\\\"disableBodyPruning\\\":true},\\\"rawModeData\\\":\\\"{\\\\n    \\\\\\\"field\\\\\\\": \\\\\\\"Value\\\\\\\"\\\\n}\\\",\\\"graphqlModeData\\\":{}}\",\n  \"createdAt\": \"2023-09-01T09:29:54.000Z\",\n  \"lastRevision\": 32368133468,\n  \"lastUpdatedBy\": \"12345678\",\n  \"owner\": \"12345678\",\n  \"request\": \"c82dd02c-4870-4907-8fcb-593a876cf05b\",\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07', [
  'body' => '{
  "name": "Example Response",
  "headers": {
    "0": {
      "key": "Date",
      "value": "Fri, 01 Sep 2023 07:36:18 GMT"
    },
    "1": {
      "key": "Content-Type",
      "value": "application/json; charset=utf-8"
    },
    "2": {
      "key": "Content-Length",
      "value": "607"
    },
    "3": {
      "key": "Connection",
      "value": "keep-alive"
    }
  },
  "responseCode": {
    "code": 200,
    "name": "OK"
  },
  "status": null,
  "time": "50",
  "cookies": null,
  "mime": null,
  "text": "{\\n    \\"args\\": {},\\n    \\"data\\": {\\n        \\"field\\": \\"Value\\"\\n    },\\n    \\"files\\": {},\\n    \\"form\\": {},\\n    \\"headers\\": {\\n        \\"x-forwarded-proto\\": \\"https\\",\\n        \\"x-forwarded-port\\": \\"443\\",\\n        \\"host\\": \\"postman-echo.com\\",\\n        \\"x-amzn-trace-id\\": \\"Root=1-64f9cd12-62f18f3a048796d345508073\\",\\n        \\"content-length\\": \\"24\\",\\n        \\"content-type\\": \\"application/json\\",\\n        \\"x-api-key\\": \\"xxx\\",\\n        \\"user-agent\\": \\"PostmanRuntime/7.32.3\\",\\n        \\"accept\\": \\"*/*\\",\\n        \\"postman-token\\": \\"XXX\\",\\n        \\"accept-encoding\\": \\"gzip, deflate, br\\"\\n    },\\n    \\"json\\": {\\n        \\"field\\": \\"Value\\"\\n    },\\n    \\"url\\": \\"https://postman-echo.com/post\\"\\n}",
  "language": "json",
  "rawDataType": null,
  "requestObject": "{\\"data\\":null,\\"dataMode\\":\\"raw\\",\\"dataOptions\\":{\\"raw\\":{\\"language\\":\\"json\\"}},\\"headerData\\":[],\\"method\\":\\"POST\\",\\"pathVariableData\\":[],\\"queryParams\\":[],\\"url\\":\\"https://postman-echo.com/post\\",\\"headers\\":\\"\\",\\"pathVariables\\":{},\\"protocolProfileBehavior\\":{\\"disableBodyPruning\\":true},\\"rawModeData\\":\\"{\\\\n    \\\\\\"field\\\\\\": \\\\\\"Value\\\\\\"\\\\n}\\",\\"graphqlModeData\\":{}}",
  "createdAt": "2023-09-01T09:29:54.000Z",
  "lastRevision": 32368133468,
  "lastUpdatedBy": "12345678",
  "owner": "12345678",
  "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "updatedAt": "2023-09-01T09:29:54.000Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Update Response
using RestSharp;

var client = new RestClient("https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07");
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 Response\",\n  \"headers\": {\n    \"0\": {\n      \"key\": \"Date\",\n      \"value\": \"Fri, 01 Sep 2023 07:36:18 GMT\"\n    },\n    \"1\": {\n      \"key\": \"Content-Type\",\n      \"value\": \"application/json; charset=utf-8\"\n    },\n    \"2\": {\n      \"key\": \"Content-Length\",\n      \"value\": \"607\"\n    },\n    \"3\": {\n      \"key\": \"Connection\",\n      \"value\": \"keep-alive\"\n    }\n  },\n  \"responseCode\": {\n    \"code\": 200,\n    \"name\": \"OK\"\n  },\n  \"status\": null,\n  \"time\": \"50\",\n  \"cookies\": null,\n  \"mime\": null,\n  \"text\": \"{\\n    \\\"args\\\": {},\\n    \\\"data\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"files\\\": {},\\n    \\\"form\\\": {},\\n    \\\"headers\\\": {\\n        \\\"x-forwarded-proto\\\": \\\"https\\\",\\n        \\\"x-forwarded-port\\\": \\\"443\\\",\\n        \\\"host\\\": \\\"postman-echo.com\\\",\\n        \\\"x-amzn-trace-id\\\": \\\"Root=1-64f9cd12-62f18f3a048796d345508073\\\",\\n        \\\"content-length\\\": \\\"24\\\",\\n        \\\"content-type\\\": \\\"application/json\\\",\\n        \\\"x-api-key\\\": \\\"xxx\\\",\\n        \\\"user-agent\\\": \\\"PostmanRuntime/7.32.3\\\",\\n        \\\"accept\\\": \\\"*/*\\\",\\n        \\\"postman-token\\\": \\\"XXX\\\",\\n        \\\"accept-encoding\\\": \\\"gzip, deflate, br\\\"\\n    },\\n    \\\"json\\\": {\\n        \\\"field\\\": \\\"Value\\\"\\n    },\\n    \\\"url\\\": \\\"https://postman-echo.com/post\\\"\\n}\",\n  \"language\": \"json\",\n  \"rawDataType\": null,\n  \"requestObject\": \"{\\\"data\\\":null,\\\"dataMode\\\":\\\"raw\\\",\\\"dataOptions\\\":{\\\"raw\\\":{\\\"language\\\":\\\"json\\\"}},\\\"headerData\\\":[],\\\"method\\\":\\\"POST\\\",\\\"pathVariableData\\\":[],\\\"queryParams\\\":[],\\\"url\\\":\\\"https://postman-echo.com/post\\\",\\\"headers\\\":\\\"\\\",\\\"pathVariables\\\":{},\\\"protocolProfileBehavior\\\":{\\\"disableBodyPruning\\\":true},\\\"rawModeData\\\":\\\"{\\\\n    \\\\\\\"field\\\\\\\": \\\\\\\"Value\\\\\\\"\\\\n}\\\",\\\"graphqlModeData\\\":{}}\",\n  \"createdAt\": \"2023-09-01T09:29:54.000Z\",\n  \"lastRevision\": 32368133468,\n  \"lastUpdatedBy\": \"12345678\",\n  \"owner\": \"12345678\",\n  \"request\": \"c82dd02c-4870-4907-8fcb-593a876cf05b\",\n  \"updatedAt\": \"2023-09-01T09:29:54.000Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update Response
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Example Response",
  "headers": [
    "0": [
      "key": "Date",
      "value": "Fri, 01 Sep 2023 07:36:18 GMT"
    ],
    "1": [
      "key": "Content-Type",
      "value": "application/json; charset=utf-8"
    ],
    "2": [
      "key": "Content-Length",
      "value": "607"
    ],
    "3": [
      "key": "Connection",
      "value": "keep-alive"
    ]
  ],
  "responseCode": [
    "code": 200,
    "name": "OK"
  ],
  "status": ,
  "time": "50",
  "cookies": ,
  "mime": ,
  "text": "{
    \"args\": {},
    \"data\": {
        \"field\": \"Value\"
    },
    \"files\": {},
    \"form\": {},
    \"headers\": {
        \"x-forwarded-proto\": \"https\",
        \"x-forwarded-port\": \"443\",
        \"host\": \"postman-echo.com\",
        \"x-amzn-trace-id\": \"Root=1-64f9cd12-62f18f3a048796d345508073\",
        \"content-length\": \"24\",
        \"content-type\": \"application/json\",
        \"x-api-key\": \"xxx\",
        \"user-agent\": \"PostmanRuntime/7.32.3\",
        \"accept\": \"*/*\",
        \"postman-token\": \"XXX\",
        \"accept-encoding\": \"gzip, deflate, br\"
    },
    \"json\": {
        \"field\": \"Value\"
    },
    \"url\": \"https://postman-echo.com/post\"
}",
  "language": "json",
  "rawDataType": ,
  "requestObject": "{\"data\":null,\"dataMode\":\"raw\",\"dataOptions\":{\"raw\":{\"language\":\"json\"}},\"headerData\":[],\"method\":\"POST\",\"pathVariableData\":[],\"queryParams\":[],\"url\":\"https://postman-echo.com/post\",\"headers\":\"\",\"pathVariables\":{},\"protocolProfileBehavior\":{\"disableBodyPruning\":true},\"rawModeData\":\"{\n    \\"field\\": \\"Value\\"\n}\",\"graphqlModeData\":{}}",
  "createdAt": "2023-09-01T09:29:54.000Z",
  "lastRevision": 32368133468,
  "lastUpdatedBy": "12345678",
  "owner": "12345678",
  "request": "c82dd02c-4870-4907-8fcb-593a876cf05b",
  "updatedAt": "2023-09-01T09:29:54.000Z"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2/responses/cc364734-7dfd-4bfc-897d-be763dcdbb07")! 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()
```