curl --request POST \
--url https://v1.api.altostrat.io/captive/walled-garden/{siteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Google Authentication Servers",
"ip_address": "172.217.16.0/24",
"type": "captive-auth"
}
'import requests
url = "https://v1.api.altostrat.io/captive/walled-garden/{siteId}"
payload = {
"name": "Google Authentication Servers",
"ip_address": "172.217.16.0/24",
"type": "captive-auth"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Google Authentication Servers',
ip_address: '172.217.16.0/24',
type: 'captive-auth'
})
};
fetch('https://v1.api.altostrat.io/captive/walled-garden/{siteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/captive/walled-garden/{siteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Google Authentication Servers',
'ip_address' => '172.217.16.0/24',
'type' => 'captive-auth'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/captive/walled-garden/{siteId}"
payload := strings.NewReader("{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/captive/walled-garden/{siteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/captive/walled-garden/{siteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f1e2d3c4-b5a6-9876-5432-10fedcba9876",
"name": "Google Authentication Servers",
"type": "captive-auth",
"ip_address": "172.217.16.0/24",
"created_at": "2025-10-27T18:00:00Z"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Create a walled garden entry
Adds a new IP address or subnet to the walled garden for a specific site, allowing users to access it before authenticating.
curl --request POST \
--url https://v1.api.altostrat.io/captive/walled-garden/{siteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Google Authentication Servers",
"ip_address": "172.217.16.0/24",
"type": "captive-auth"
}
'import requests
url = "https://v1.api.altostrat.io/captive/walled-garden/{siteId}"
payload = {
"name": "Google Authentication Servers",
"ip_address": "172.217.16.0/24",
"type": "captive-auth"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Google Authentication Servers',
ip_address: '172.217.16.0/24',
type: 'captive-auth'
})
};
fetch('https://v1.api.altostrat.io/captive/walled-garden/{siteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/captive/walled-garden/{siteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Google Authentication Servers',
'ip_address' => '172.217.16.0/24',
'type' => 'captive-auth'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/captive/walled-garden/{siteId}"
payload := strings.NewReader("{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/captive/walled-garden/{siteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/captive/walled-garden/{siteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Google Authentication Servers\",\n \"ip_address\": \"172.217.16.0/24\",\n \"type\": \"captive-auth\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f1e2d3c4-b5a6-9876-5432-10fedcba9876",
"name": "Google Authentication Servers",
"type": "captive-auth",
"ip_address": "172.217.16.0/24",
"created_at": "2025-10-27T18:00:00Z"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
API Key authentication. Provide your token in the 'Authorization' header. Example: Authorization: Bearer <YOUR_TOKEN>
Path Parameters
The unique identifier for the site.
"a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6"
Body
A descriptive name for the entry.
"Google Authentication Servers"
The IP address or subnet in CIDR notation to allow. Must be a valid RFC 4632 address.
"172.217.16.0/24"
An optional type to categorize the entry.
captive-auth, captive-portal "captive-auth"
Response
The walled garden entry was created successfully.
The unique identifier for the walled garden entry.
"f1e2d3c4-b5a6-9876-5432-10fedcba9876"
A descriptive name for the entry.
"Google Authentication Servers"
The type of service this entry is for.
captive-auth, captive-portal "captive-auth"
The IP address or subnet in CIDR notation that is allowed pre-authentication.
"172.217.16.0/24"
The timestamp when the entry was created.
"2025-10-27T18:00:00Z"
Was this page helpful?