1---
2layout: "api"
3page_title: "/sys/namespaces - HTTP API"
4sidebar_title: "<code>/sys/namespaces</code>"
5sidebar_current: "api-http-system-namespaces"
6description: |-
7  The `/sys/namespaces` endpoint is used manage namespaces in Vault.
8---
9
10# `/sys/namespaces`
11
12The `/sys/namespaces` endpoint is used manage namespaces in Vault.
13
14## List Namespaces
15
16This endpoints lists all the namespaces.
17
18| Method   | Path                         |
19| :--------------------------- | :--------------------- |
20| `LIST`   | `/sys/namespaces`            |
21
22### Sample Request
23
24```
25$ curl \
26    --header "X-Vault-Token: ..." \
27    -X LIST \
28    http://127.0.0.1:8200/v1/sys/namespaces
29```
30
31### Sample Response
32
33```json
34[
35    "ns1/",
36    "ns2/"
37]
38
39```
40
41## Create Namespace
42
43This endpoint creates a namespace at the givent path.
44
45| Method   | Path                         |
46| :--------------------------- | :--------------------- |
47| `POST`   | `/sys/namespaces/:path`      |
48
49### Parameters
50
51- `path` `(string: <required>)` – Specifies the path where the namespace
52  will be namespace. This is specified as part of the URL.
53
54### Sample Request
55
56```
57$ curl \
58    --header "X-Vault-Token: ..." \
59    --request POST \
60    http://127.0.0.1:8200/v1/sys/namespaces/ns1
61```
62
63## Delete Namespace
64
65This endpoint deletes a namespace at the specified path.
66
67| Method   | Path                         |
68| :--------------------------- | :--------------------- |
69| `DELETE` | `/sys/namespaces/:path`      | `204 (empty body)    ` |
70
71### Sample Request
72
73```
74$ curl \
75    --header "X-Vault-Token: ..." \
76    --request DELETE \
77    http://127.0.0.1:8200/v1/sys/namespaces/ns1
78```
79
80## Read Namespace Information
81
82This endpoint get the metadata for the given namespace path.
83
84| Method   | Path                         |
85| :--------------------------- | :--------------------- |
86| `GET`    | `/sys/namespaces/:path`      |
87
88### Sample Request
89
90```
91$ curl \
92    --header "X-Vault-Token: ..." \
93    http://127.0.0.1:8200/v1/sys/namespaces/ns1
94```
95
96### Sample Response
97
98```json
99{
100  "id": "gsudj",
101  "path": "ns1/"
102}
103```
104