Skip to main content
POST
/
vpn_sessions
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";

const latitudesh = new Latitudesh({
  bearer: process.env["LATITUDESH_BEARER"] ?? "",
});

async function run() {
  const result = await latitudesh.vpnSessions.create({
    data: {
      attributes: {
        site: "SAO",
        serverId: "sv_LMmAD8wyqwop2",
      },
    },
  });

  console.log(result);
}

run();
{
  "data": {
    "id": "vpn_VLMmAD8EOwop2",
    "type": "vpn_sessions",
    "attributes": {
      "user_name": "Cameron",
      "password": "8EqcGL2tsQngWe",
      "port": "8443",
      "host": "fw04-mh1.maxi.host",
      "region": {
        "city": "São Paulo 277",
        "country": "Brazil 290",
        "site": {
          "id": "loc_VE1Wd3wQdXnZJ",
          "name": "São Paulo 277",
          "slug": "SAO",
          "facility": "São Paulo 277"
        }
      },
      "expires_at": "2026-01-14T15:58:20+00:00",
      "created_at": "2026-01-14T15:57:20+00:00",
      "updated_at": "2026-01-14T15:57:20+00:00"
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Body

data
object

Response

201 - application/vnd.api+json

Created

data
object