Pangolin icon

Pangolin

Interact with the Pangolin API

Actions142

Site → Create a new site.

AI-generated

Summary

Create a new site within a specified organization by providing the organization's ID and the site's details in JSON format.

Inputs

  • Org ID (required) — The unique identifier of the organization under which the site will be created.
  • Body (required) — A JSON object containing the details of the new site, including required fields such as 'name' and 'type' (which can be 'newt', 'wireguard', or 'local'). Other optional fields like 'exitNodeId', 'pubKey', 'subnet', 'newtId', 'secret', and 'address' can also be included to configure the site.
  • Options — Additional options such as 'Raw Response' to control whether the full response data is returned or individual items are split.

Output shape

a single record representing the created site returned as JSON

The response shape depends on the API output and can be returned either as the full response JSON or as individual items if the 'Raw Response' option is set to false.

Examples

Example 1: Create a new site with required fields

Set 'Org ID' to the target organization's ID. Provide a JSON body with at least the 'name' and 'type' of the site to create.

Discussion