---
updatedAt: 2026-05-28T21:10:45.000Z
agentTools:
  projectIndex: https://docs.hivestack.com/llms.txt
---

# Create a site

Creates a site associated to your organization

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Inventory",
    "version": "2",
    "description": "Inventory",
    "contact": {
      "email": "support@perion.com"
    }
  },
  "servers": [
    {
      "url": "https://apps.hivestack.com/api/v2"
    }
  ],
  "security": [
    {
      "APIKeyHeader": []
    },
    {
      "APIKeyQuery": []
    }
  ],
  "tags": [
    {
      "name": "Sites",
      "description": ""
    }
  ],
  "paths": {
    "/sites": {
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Create a site",
        "description": "Creates a site associated to your organization",
        "operationId": "postSite",
        "requestBody": {
          "description": "A payload containing required site fields",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/site"
                  },
                  {
                    "required": [
                      "description",
                      "external_id",
                      "latitude",
                      "longitude",
                      "name"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessSite"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "name": "hs-auth",
        "in": "header",
        "description": "The value should follow the following format: `apikey access_key:secret_key`"
      },
      "APIKeyQuery": {
        "type": "apiKey",
        "name": "apikey",
        "in": "query",
        "description": "The value should follow the following format: `access_key:secret_key`"
      }
    },
    "schemas": {
      "site": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "readOnly": true,
            "example": true
          },
          "created_on_utc": {
            "type": "string",
            "readOnly": true,
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "description": "The field that is shown in the UI effectively as its name",
            "example": "A Site description"
          },
          "external_id": {
            "type": "string",
            "description": "Your organization's unique identifier so that you can relate a site in your own inventory system with a site in our system",
            "example": "an_external_id"
          },
          "latitude": {
            "type": "number",
            "example": 45.496011
          },
          "location_id": {
            "type": "integer",
            "example": 12174
          },
          "longitude": {
            "type": "number",
            "example": -73.569371
          },
          "modified_on_utc": {
            "type": "string",
            "readOnly": true,
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "example": "Unit Name"
          },
          "owner_id": {
            "type": "integer",
            "readOnly": true,
            "description": "The ID of the organization that owns the site",
            "example": 14
          },
          "site_id": {
            "type": "integer",
            "readOnly": true,
            "example": 1
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "example": "cc3f9c08-e3c1-47ee-a325-3d9bb14b0f54"
          }
        }
      }
    },
    "responses": {
      "SuccessSite": {
        "description": "OK - an object representing a site",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/site"
            }
          }
        }
      }
    }
  }
}
```