---
updatedAt: 2025-08-14T13:36:25.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# PREVIEW: Creates a site.

Creates a new site with the specified details.<br/><br/><b>NOTE:</b>This endpoint is currently in a preview stage.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "N-central API-Service",
    "description": "<h3>API Access</h3>\n<p>In order to use the API-Service endpoints, ensure the following prerequisites are met:</p>\n<ol>\n    <li>User is created in N-central with appropriate permissions and configuration\n        (roles, access groups, MFA disabled, 2FA disabled).</li>\n    <li>API access is set up in N-central by having a JWT\n        (Json Web Token, referred to as \"N-central User-API Token\") generated,\n        acting as the permanent secret solely used for fetching access and refresh tokens.</li>\n</ol>\n<p>To access the API-Service endpoints, the JWT must first be exchanged with access and refresh tokens:</p>\n<ul>\n    <li>\n        <p><b>Using Swagger UI:</b></p>\n        <ol>\n            <li>Click on the <b>\"Authorize\"</b> button and enter the JWT into the value field\n                under <b>\"N-central_User-API_Token_JWT\"</b>, then navigate to\n                the <code>/api/auth/authenticate</code> endpoint, click <b>\"Try it out\"</b>\n                and then <b>\"Execute\"</b>.\n                <br/>The new “Access Token” and “Refresh Token” fields will be available in the “Server Response”\n                section below. Note that the expiry is 3600s ( 1h ). Copy the value of the access token.</li>\n            <li>Click on the <b>lock icon</b> to the right of any endpoint\n                (or the <b>\"Authorize\"</b> button at the top), enter the access token in the\n                <b>\"API-Access_Token\"</b> field and click <b>\"Authorize\"</b>.</li>\n            <li>To call an API-Service endpoint, navigate to it, click <b>\"Try it out\"</b> button and\n            then <b>\"Execute\"</b>. If the steps above were successful, the access token is included in requests\n            automatically.</li>\n        </ol>\n    </li>\n    <li>\n        <p><b>Using a different HTTP client:</b></p>\n        <ol>\n            <li>Call the <code>/api/auth/authenticate</code> endpoint.\n                The JWT token must be specified under the <code>Authorization</code> header,\n                in the form <code>Bearer &lt;YOUR_JWT&gt;\"</code>.\n                <br/>The access and refresh tokens are present in the response.</li>\n            <li>When calling API-Service endpoints, make sure to specify the <b>access token</b> in\n            the <code>Authorization</code> header as <code>Bearer &lt;ACCESS_TOKEN&gt;</code>.</li>\n        </ol>\n    </li>\n</ul>\n<h3>API Pagination & Sorting</h3>\n<p>Certain API-Service query endpoints support pagination and sorting through the use of query parameters.</p>\n<p><b>Pagination query parameters:</b></p>\n<ul>\n    <li>pageSize: number between 1 and 1000 specifying how many items to return for each page (if available).\n        If unspecified, the default is 50.</li>\n    <li>pageNumber: number specifying what page of data to retrieve, starting from 1 as the first page.\n        If unspecified, the default is 1.</li>\n</ul>\n<p>A paginated response contains several related fields, such as pageSize, pageNumber, itemCount, totalItems,\n    totalPages, _links (first, last, previous and next pages) and _warning (containing any warning messages,\n    if present).</p>\n<p><b>Sorting query parameters:</b></p>\n<ul>\n    <li>sortBy: the name of the field to sort the results by. If unspecified, no sorting is applied.</li>\n    <li>sortOrder: the case insensitive sorting direction supporting ASC/ASCENDING/NATURAL and\n        DESC/DESCENDING/REVERSE. If unspecified, the default is ASC.</li>\n</ul>\n<h3>API Rate Limiting</h3>\n<p>The API-Service endpoints are rate limited to ensure the stability, availability and performance of\n    the overall system.</p>\n<p>Upon reaching such a rate limit, the endpoints return HTTP Status 429 - Too Many Requests.</p>\n<p>The system will accept further requests once existing in-flight requests are completed.</p>\n",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{custom-server}/",
      "description": "Default Server URL"
    }
  ],
  "tags": [
    {
      "name": "Organization Units",
      "description": "Organization-Unit operations. These include customers, sites and service organizations."
    }
  ],
  "paths": {
    "/api/customers/{customerId}/sites": {
      "post": {
        "tags": [
          "Organization Units"
        ],
        "summary": "PREVIEW: Creates a site.",
        "description": "Creates a new site with the specified details.<br/><br/><b>NOTE:</b>This endpoint is currently in a preview stage.",
        "operationId": "createSite",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The information for the customer to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteCreation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Request was successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource format.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": {
                    "status": 400,
                    "message": "[ID=abcd] BAD REQUEST: Site Create -- Name is required and cannot be blank: Name: '%s'"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication Failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": {
                    "status": 401,
                    "message": "[ID=abcd] UNAUTHORIZED: UnauthorizedException: Missing authorization header bearer."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": {
                    "status": 404,
                    "message": "[ID=abcd] NOT FOUND: ResourceNotFoundException: Org Unit not found: '555'."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": {
                    "status": 500,
                    "message": "[ID=abcd] INTERNAL SERVER ERROR: UnexpectedDmsResponseException: Unexpected response from DMS: The DMS response indicates a non-success status code."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "API-Access_Token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        },
        "description": "Error response",
        "example": {
          "status": 400,
          "message": "[ID=2b85998f-26a3-467a] BAD REQUEST: InvalidInputFormatException: Invalid customerId format: 'null'."
        }
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "SiteCreation": {
        "required": [
          "contactFirstName",
          "contactLastName",
          "siteName"
        ],
        "type": "object",
        "properties": {
          "contactFirstName": {
            "type": "string",
            "description": "First name of the contact for the organization unit."
          },
          "contactLastName": {
            "type": "string",
            "description": "Last name of the contact for the organization unit."
          },
          "externalId": {
            "type": "string",
            "description": "The external ID of the organization unit."
          },
          "phone": {
            "type": "string",
            "description": "Telephone of the contact for the organization unit."
          },
          "contactTitle": {
            "type": "string",
            "description": "Title of the contact for the organization unit."
          },
          "contactEmail": {
            "type": "string",
            "description": "Contact email for the organization unit."
          },
          "contactPhone": {
            "type": "string",
            "description": "Telephone of the contact for the organization unit."
          },
          "contactPhoneExt": {
            "type": "string",
            "description": "Telephone extension of the contact for the organization unit."
          },
          "contactDepartment": {
            "type": "string",
            "description": "Department of the contact for the organization unit."
          },
          "street1": {
            "type": "string",
            "description": "First line of street address for the organization unit."
          },
          "street2": {
            "type": "string",
            "description": "Second line of street address for the organization unit."
          },
          "city": {
            "type": "string",
            "description": "City where the organization unit is located."
          },
          "stateProv": {
            "type": "string",
            "description": "State or province where the organization unit is located."
          },
          "country": {
            "type": "string",
            "description": "Country where the organization unit is located. Must be two characters country code, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2."
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code of the organization unit location."
          },
          "siteName": {
            "type": "string",
            "description": "Name of the site."
          },
          "licenseType": {
            "type": "string",
            "description": "License type of the site.",
            "default": "Professional"
          }
        },
        "description": "Data object for site.",
        "example": {
          "siteName": "New site name",
          "contactFirstName": "first name",
          "contactLastName": "last name",
          "licenseType": "Professional",
          "externalId": "extId",
          "phone": "phone",
          "contactTitle": "contact title",
          "contactEmail": "contact@email.com",
          "contactPhone": "(123)456-7890",
          "contactPhoneExt": null,
          "contactDepartment": "Support",
          "street1": "One Street",
          "street2": "",
          "city": "Ottawa",
          "stateProv": "Ontario",
          "country": "CA",
          "postalCode": "A1A 1A1"
        }
      },
      "SiteCreated": {
        "type": "object",
        "properties": {
          "siteId": {
            "type": "integer",
            "description": "Id of the created site.",
            "format": "int32"
          }
        }
      }
    },
    "securitySchemes": {
      "API-Access_Token": {
        "type": "http",
        "description": "Access token for API. You can get the token by authenticating. See \"POST - /api/auth/authenticate\".",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```