1---
2layout: "api"
3page_title: "/sys/wrapping/unwrap - HTTP API"
4sidebar_title: "<code>/sys/wrapping/unwrap</code>"
5sidebar_current: "api-http-system-wrapping-unwrap"
6description: |-
7  The `/sys/wrapping/unwrap` endpoint unwraps a wrapped response.
8---
9
10# `/sys/wrapping/unwrap`
11
12The `/sys/wrapping/unwrap` endpoint unwraps a wrapped response.
13
14## Wrapping Unwrap
15
16This endpoint returns the original response inside the given wrapping token.
17Unlike simply reading `cubbyhole/response` (which is deprecated), this endpoint
18provides additional validation checks on the token, returns the original value
19on the wire rather than a JSON string representation of it, and ensures that the
20response is properly audit-logged.
21
22This endpoint can be used by using a wrapping token as the client token in the
23API call, in which case the `token` parameter is not required; or, a different
24token with permissions to access this endpoint can make the call and pass in the
25wrapping token in the `token` parameter. Do _not_ use the wrapping token in both
26locations; this will cause the wrapping token to be revoked but the value to be
27unable to be looked up, as it will basically be a double-use of the token!
28
29| Method   | Path                         | Produces               |
30| :------- | :--------------------------- | :--------------------- |
31| `POST`   | `/sys/wrapping/unwrap`       | `200 application/json` |
32
33### Parameters
34
35- `token` `(string: "")` – Specifies the wrapping token ID. This is required if
36  the client token is not the wrapping token. Do not use the wrapping token in
37  both locations.
38
39### Sample Payload
40
41```json
42{
43  "token": "abcd1234..."
44}
45```
46
47### Sample Request
48
49```
50$ curl \
51    --header "X-Vault-Token: ..." \
52    --request POST \
53    --data @payload.json \
54    http://127.0.0.1:8200/v1/sys/wrapping/unwrap
55```
56
57### Sample Response
58
59```json
60{
61  "request_id": "8e33c808-f86c-cff8-f30a-fbb3ac22c4a8",
62  "lease_id": "",
63  "lease_duration": 2592000,
64  "renewable": false,
65  "data": {
66    "zip": "zap"
67  },
68  "warnings": null
69}
70```
71