Manage Sites

Overview

Sites provide a powerful way to organize devices within customer organizations in N-central. Particularly useful for customers with multiple locations, Sites enable you to:

  • Organize and monitor devices by physical location
  • Map different locations to various PSA tools (MSP Manager, ConnectWise, Autotask)
  • Configure location-specific monitoring and management settings
  • Maintain independent feature sets for different branches

Sites exist within the Customer hierarchy and offer granular control over device management at each physical location. This flexibility is especially useful for customers with satellite offices or distributed operations that require location-specific configurations. This guide walks you through using the Sites API to programmatically manage your location-based organizational structure. You'll learn how to:

  1. Create Sites under a Customer
  2. Retrieve Site information
  3. List all Sites across your organization
  4. Work with Site registration tokens
  5. Manage Site-specific settings

Create Site

To add a new Site to N-central, use the Create Site endpoint. Sites must be created within the context of a Customer.

Required body parameters:

  • siteName: Name of the site location
  • contactFirstName: First name of the site contact
  • contactLastName: Last name of the site contact

Optional parameters:

  • licenseType: Type of license (defaults to "Professional")
  • externalId: Your own identifier for integration purposes
  • contactEmail: Email address for site notifications
  • contactPhone: Phone number for site contact
  • address: Physical location details (street1, street2, city, etc.)

Request

POST https://your-server/api/customers/{customerId}/sites
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json

{
  "siteName": "Downtown Data Center",
  "contactFirstName": "Robert",
  "contactLastName": "Chen",
  "licenseType": "Professional",
  "contactEmail": "[email protected]",
  "contactPhone": "555-0189",
  "street1": "789 Server Lane",
  "city": "Boston",
  "stateProv": "MA",
  "country": "US",
  "postalCode": "02110"
}

Response

A successful creation returns a 201 status code with the new Site's details:

{
  "data": {
    "siteId": 34567,
    "siteName": "Downtown Data Center",
    "orgUnitType": "SITE",
    "parentId": "78901",
    "contactFirstName": "Robert",
    "contactLastName": "Chen",
    "contactEmail": "[email protected]"
  }
}

Retrieve Site Details

Get comprehensive information about a specific Site using its siteId.

Request

GET https://your-server/api/sites/{siteId}
Authorization: Bearer <YOUR_TOKEN>

Response

{
  "data": {
    "siteId": "34567",
    "siteName": "Downtown Data Center",
    "orgUnitType": "SITE",
    "parentId": "78901",
    "externalId": "SITE-001",
    "contactFirstName": "Robert",
    "contactLastName": "Chen",
    "contactEmail": "[email protected]",
    "contactPhone": "555-0189",
    "street1": "789 Server Lane",
    "city": "Boston",
    "stateProv": "MA",
    "country": "US",
    "postalCode": "02110",
    "licenseType": "Professional"
  }
}

List Sites

Retrieve all Sites across your organization with support for pagination and sorting.

Optional query parameters:

  • pageSize: Number of items per page (default: 50)
  • pageNumber: Page to retrieve (starts at 1)
  • sortBy: Field to sort by
  • sortOrder: Sort direction (ASC/DESC)

Request

GET https://your-server/api/sites?pageSize=20&pageNumber=1
Authorization: Bearer <YOUR_TOKEN>

Response

{
  "data": [
    {
      "siteId": "34567",
      "siteName": "Downtown Data Center",
      "orgUnitType": "SITE",
      "parentId": "78901"
    },
    {
      "siteId": "34568",
      "siteName": "West Coast Office",
      "orgUnitType": "SITE",
      "parentId": "78901"
    }
  ],
  "totalItems": 45,
  "pageNumber": 1,
  "pageSize": 20
}

Site Registration Tokens

Retrieve registration tokens for site device deployment.

Request

GET https://your-server/api/sites/{siteId}/registration-token
Authorization: Bearer <YOUR_TOKEN>

Response

{
  "data": {
    "registrationToken": "2f64ee5e-7c37-dce7-ffd2-d32912609623",
    "registrationTokenExpiryDate": "2024-05-01T23:59:00-04:00[America/New_York]"
  }
}

Error Handling

Common error responses you'll encounter:

  • 400 Bad Request: Invalid input or missing required fields
  • 401 Unauthorized: Invalid or expired token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Site not found
  • 429 Too Many Requests: Rate limit exceeded

Error Response Format

{
  "status": 400,
  "message": "[ID=abcd] BAD REQUEST: Site Create -- Name is required and cannot be blank"
}