Skip to main content

Remote Access

Open secure WireGuard tunnels to individual devices, governed by tunnel policy.

Endpoints

MethodPathDescription
GET/api/orgs/{org_id}/tunnel-policyGet the org tunnel policy
GET/api/orgs/{org_id}/projects/{project_id}/cohorts/{cohort_id}/tunnel-policyGet a cohort's tunnel policy
POST/api/orgs/{org_id}/tunnelsOpen a device tunnel
GET/api/orgs/{org_id}/tunnels/{id}Get a device tunnel
DELETE/api/orgs/{org_id}/tunnels/{id}Close a device tunnel
GET/api/orgs/{org_id}/devices/{device_id}/tunnelsList a device's tunnels

Get the org tunnel policy

GET /api/orgs/{org_id}/tunnel-policy

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: TunnelPolicyPolicy.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/tunnel-policy" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"max_ttl_seconds": 0,
"backoff_seconds": 0,
"max_concurrent": 0,
"cidr_allowlist": ["string"],
"require_reason": true,
"allowed_windows": [{}]
}
}

Get a cohort's tunnel policy

GET /api/orgs/{org_id}/projects/{project_id}/cohorts/{cohort_id}/tunnel-policy

Returns the resolved policy and the cohort's overrides.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
cohort_idstring

Responses:

StatusBodyDescription
200data: CohortTunnelPolicyPolicy.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/cohorts/{cohort_id}/tunnel-policy" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"resolved": {
"max_ttl_seconds": 0,
"backoff_seconds": 0,
"max_concurrent": 0,
"cidr_allowlist": ["string"],
"require_reason": true,
"allowed_windows": [{}]
},
"overrides": {
"max_ttl_seconds": 0,
"backoff_seconds": 0,
"max_concurrent": 0,
"cidr_allowlist": ["string"],
"require_reason": true,
"allowed_windows": [{}]
}
}
}

Open a device tunnel

POST /api/orgs/{org_id}/tunnels

Opens a tunnel to a device by device ID (org-scoped; used by LaunchPad/Fleet). Defaults to a 1-hour TTL and device proxy port 9090.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
device_idstringYes
device_proxy_portintegerNoDefaults to 9090.

Responses:

StatusBodyDescription
201data: DeviceTunnelSummaryRequested.
404ErrorResource not found.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/tunnels" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_proxy_port": 9090
}'

Example response (201):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"state": "string",
"device_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"relay_endpoint": "string",
"server_proxy_port": 0,
"device_proxy_port": 0,
"expires_at": "2026-08-14T12:00:00Z",
"established_at": "2026-08-14T12:00:00Z",
"failure_reason": "string"
}
}

Get a device tunnel

GET /api/orgs/{org_id}/tunnels/{id}

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
idstring

Responses:

StatusBodyDescription
200data: DeviceTunnelSummaryTunnel.
404ErrorResource not found.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/tunnels/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"state": "string",
"device_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"relay_endpoint": "string",
"server_proxy_port": 0,
"device_proxy_port": 0,
"expires_at": "2026-08-14T12:00:00Z",
"established_at": "2026-08-14T12:00:00Z",
"failure_reason": "string"
}
}

Close a device tunnel

DELETE /api/orgs/{org_id}/tunnels/{id}

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
idstring

Responses:

StatusBodyDescription
204Closed.
404ErrorResource not found.

Example request:

curl -X DELETE "https://connect.peridio.com/api/orgs/{org_id}/tunnels/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

List a device's tunnels

GET /api/orgs/{org_id}/devices/{device_id}/tunnels

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
device_idstring

Query parameters:

NameTypeRequiredDescription
cursorstringNoOpaque pagination cursor from a prior response's meta.after/meta.before.
limitintegerNoMax items per page (clamped 1–100). Defaults to 20. Range 1–100.
directionstringNoPage direction relative to the cursor. One of: after, before. Defaults to "after".

Responses:

StatusBodyDescription
200data: array of DeviceTunnelSummary, meta: PaginationMetaTunnels.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/devices/{device_id}/tunnels" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": [
{
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"state": "string",
"device_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"relay_endpoint": "string",
"server_proxy_port": 0,
"device_proxy_port": 0,
"expires_at": "2026-08-14T12:00:00Z",
"established_at": "2026-08-14T12:00:00Z",
"failure_reason": "string"
}
],
"meta": {
"after": "string",
"before": "string",
"has_next": true,
"has_previous": true,
"total": 0
}
}

Object reference

TunnelPolicy

FieldTypeDescription
max_ttl_secondsintegerNullable.
backoff_secondsintegerNullable.
max_concurrentintegerNullable.
cidr_allowliststring[]Nullable.
require_reasonbooleanNullable.
allowed_windowsobject[]Nullable.

CohortTunnelPolicy

Cohort tunnel policy: the effective (resolved) policy plus the cohort's own overrides (null fields inherit from the org).

FieldTypeDescription
resolvedTunnelPolicy
overridesTunnelPolicy

DeviceTunnelSummary

Condensed tunnel view used by org-scoped (device) tunnel endpoints.

FieldTypeDescription
idstring
statestring
device_idstring
relay_endpointstringNullable.
server_proxy_portintegerNullable.
device_proxy_portintegerNullable.
expires_atstring (date-time)Nullable.
established_atstring (date-time)Nullable.
failure_reasonstringNullable.

Error

Standard error envelope.

FieldTypeDescription
errorstringMachine-readable error code.
messagestringHuman-readable explanation.

PaginationMeta

Cursor pagination metadata. Present only when the request supplied a pagination param (cursor, limit, or direction); otherwise the full list is returned unpaginated with no meta.

FieldTypeDescription
afterstringOpaque cursor for the next page. Pass back as ?cursor=. Nullable.
beforestringOpaque cursor for the previous page. Nullable.
has_nextboolean
has_previousboolean
totalintegerNullable.