Connect a device to the VPN
POST
/api/v1/vpn/connectSend only the public half of the device's WireGuard key. The same key gets the same device back. Needs the vpn.use scope.
On this page
Request body
| Field | Type | Description |
|---|---|---|
nodeIdrequired | string |
|
namerequired | string |
|
publicKeyrequired | string |
JSON schema
{
"type": "object",
"properties": {
"nodeId": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"publicKey": {
"type": "string"
}
},
"required": [
"nodeId",
"name",
"publicKey"
]
}Example request
curl -X POST "https://polaris.example.com/api/v1/vpn/connect" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"nodeId": "string",
"name": "string",
"publicKey": "string"
}'Responses
| Status | Meaning |
|---|---|
200 | OK |
Can also answer the common errors 400, 401, 403, 404. See common errors