Skip to main content
POST
Create a captive portal instance

Authorizations

Authorization
string
header
required

API Key authentication. Provide your token in the 'Authorization' header. Example: Authorization: Bearer <YOUR_TOKEN>

Body

application/json
name
string
required

A human-readable name for the instance.

Example:

"Main Office Guest WiFi"

strategy
enum<string>
required

The authentication method for this captive portal.

Available options:
oauth2,
coupon
Example:

"oauth2"

session_ttl
integer
required

The duration in seconds that a user's session remains active after authentication. Minimum 1200, maximum 604800.

Example:

43200

auth_integration_id
string<uuid> | null

Required if strategy is 'oauth2'. The ID of a pre-configured authentication integration.

Example:

"c4d5e6f7-8a9b-0c1d-2e3f-4a5b6c7d8e9f"

Response

The captive portal instance was created successfully.

id
string<uuid>

The unique identifier for the instance.

Example:

"9a7f1b2c-3d4e-5f6a-7b8c-9d0e1f2a3b4c"

auth_integration_id
string<uuid> | null

The ID of the authentication integration used if the strategy is 'oauth2'. Null for 'coupon' strategy.

Example:

"c4d5e6f7-8a9b-0c1d-2e3f-4a5b6c7d8e9f"

strategy
enum<string>

The authentication method for this captive portal.

Available options:
oauth2,
coupon
Example:

"oauth2"

name
string

A human-readable name for the instance.

Example:

"Main Office Guest WiFi"

session_ttl
integer

The duration in seconds that a user's session remains active after successful authentication.

Example:

43200

auth_window_ttl
integer

For OAuth2 strategy, the duration in seconds that the walled garden is temporarily opened to allow the user to complete authentication with the identity provider.

Example:

300

theme
object

A collection of branding and appearance settings.

terms_text
string | null

The text of the terms and conditions that can be displayed to the user.

Example:

"By connecting, you agree to our terms of service..."

sites
object[]

A list of sites and their subnets where this captive portal instance is active.

created_at
string<date-time>

The timestamp when the instance was created.

Example:

"2025-10-29T12:00:00Z"

preview_url
string<uri> | null

A temporary, signed URL to preview the captive portal's appearance.

Example:

"https://captive.altostr.at/preauth?token=eyJpdiI6..."