# Get org VPNs

`GET /v1/organizations/{organizationId}/vpns`

Available as MCP tool `get-org-vpns` (Read).

VPN endpoints allow you to review and manage configured VPNs within your Redox organization.

VPNs can only be configured and managed by a Redoxer. Only users assigned to an organization owner role can view VPN metadata. [Learn about roles](https://developer.redoxengine.com/permalink/1OBel3inQAjAnDbgd9QLzM). 

### Get org VPNs

Retrieve a list of VPNs associated with the specified organization.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `organizationId` | path | string | Yes | Identifies the Redox organization that you're operating in or on behalf of. |

## Request example

```bash
curl 'https://api.redoxengine.com/platform/v1/organizations/{organizationId}/vpns' \
--request GET \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json'
```

## Responses

### 200

Contains a payload object with a list of any VPNs associated with the given organization.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No |  |
| `meta.version` | string | No | Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences. |
| `payload` | object | No | Contains the payload with details about the requested VPN(s). |
| `payload.vpns` | Array of object | No | Contains an array of VPN metadata objects. |
| `payload.vpns[].name` | string | No | Displays the human-readable name of the VPN. |
| `payload.vpns[].id` | string | No | Displays the unique identifier (i.e., client ID) of the VPN. |
| `payload.vpns[].redoxReceivingIp` | string | No | Contains the IP address that's used when sending data to Redox through the specified VPN. |
| `payload.vpns[].custEncDomains` | Array of string | No | Displays the encryption domain(s) (CIDR blocks) that are used to send data through this VPN. |
| `payload.vpns[].vhost` | number | No | Displays the assigned virtual host number on the Redox side of the VPN. |
| `payload.vpns[].ports` | Array of Option 1 or Option 2 | No | Contains details about an assigned or reserved port. |
| `payload.vpns[].ports[] (Option 1).number` | number | No | Displays the reserved port number. |
| `payload.vpns[].ports[] (Option 1).status` | string | No | Displays the reserved status of the port. Value: reserved |
| `payload.vpns[].ports[] (Option 2).number` | number | No | Displays the active port number. |
| `payload.vpns[].ports[] (Option 2).status` | string | No | Displays the active status of the port. Value: active |
| `payload.vpns[].ports[] (Option 2).source` | object | No | Displays relevant information about the source this port is assigned to. |
| `payload.vpns[].ports[] (Option 2).source.id` | string | No | Contains the unique identifier of the source. |
| `payload.vpns[].ports[] (Option 2).source.name` | string | No | Displays the human-readable name of the source. |
| `payload.vpns[].ports[] (Option 2).source.environment` | object | No | Contains the environment information where the source exists. |
| `payload.vpns[].ports[] (Option 2).source.environment.id` | string | No | Contains the unique identifier of the environment within your Redox organization. |
| `payload.vpns[].ports[] (Option 2).source.environment.flag` | string | No | Indicates whether the environment is a development, staging, or production type. Possible values: Development, Staging, Production |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "meta": {
    "version": "1.0.0"
  },
  "payload": {
    "vpns": [
      {
        "name": "redox-vpn-1",
        "id": "d63b9307-a759-4e08-9b2a-d172f3ddd479",
        "redoxReceivingIp": "10.255.1.1/32",
        "custEncDomains": [
          "10.255.0.1/32"
        ],
        "vhost": 7,
        "ports": [
          {
            "number": 9901,
            "status": "reserved"
          }
        ]
      }
    ]
  }
}
```

### 400

Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.id` | string | No | Contains a unique identifier for the given error instance. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Bad Request`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Bad Request",
      "code": "validation.error.bad.request",
      "detail": "Error details",
      "status": 400,
      "transient": false
    }
  }
}
```

### 403

Forbidden

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.errors` | Array of object | No |  |
| `payload.errors[].title` | string | No | Displays the high-level error message, typically something succinct like `Forbidden`. |
| `payload.errors[].code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |

```json
{
  "payload": {
    "errors": [
      {
        "title": "Forbidden",
        "code": "authorization.forbidden"
      }
    ]
  }
}
```

### 500

Internal Server Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Failed in step X`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Internal Server Error",
      "code": "failed.db.lookup",
      "detail": "Error details",
      "status": 500,
      "transient": true
    }
  }
}
```
