Skip to main content
POST
/
instances
Create a new captive portal Instance
curl --request POST \
  --url https://api.altostrat.io/instances \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "strategy": "oauth2",
  "session_ttl": 123,
  "auth_integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "auth_integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "strategy": "oauth2",
  "name": "<string>",
  "session_ttl": 123,
  "auth_window_ttl": 123,
  "coupon_ttl": 123,
  "theme": {
    "logo": "<string>",
    "icon": "<string>",
    "accent_text": "<string>",
    "accent_color": "<string>",
    "text_color": "<string>",
    "secondary_text_color": "<string>",
    "background_color": "<string>",
    "border_color": "<string>",
    "box_color": "<string>"
  },
  "terms_text": "<string>",
  "locale": "en",
  "sites": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "subnets": [
        "<string>"
      ]
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "preview_url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Instance data to create

name
string
required
strategy
enum<string>
required
Available options:
oauth2,
coupon
session_ttl
integer
required
auth_integration_id
string<uuid> | null

Response

Instance created

id
string<uuid>
auth_integration_id
string<uuid> | null
strategy
enum<string>
Available options:
oauth2,
coupon
name
string
session_ttl
integer

Session time-to-live in seconds

auth_window_ttl
integer

TTL for the authentication window (only for oauth2 strategy)

coupon_ttl
integer

Coupon TTL in seconds (only for coupon strategy)

theme
object
terms_text
string | null
locale
string
default:en
sites
object[]

Collection of associated sites with subnets

created_at
string<date-time>
preview_url
string | null

A generated preauth URL for testing

I