> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nectarclimate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Company

> Create a new company in the system. The authenticated user will be set as the admin for the newly created company. Additional users can be added during creation via the users field, or added later via the patch request. 

**Note:** Users invited through the API must already have a Nectar account. If you provide email addresses of users who don't exist in the system, the request will fail with a 400 error.

**Team Members:** All members of your team will automatically be added to the new company as admins.

**Beta Features:**
- `isDemandEnabled`: Enable tracking of electricity demand meters for advanced usage analytics.



## OpenAPI

````yaml /api-reference/openapi-v2-2.json post /company
openapi: 3.1.0
info:
  title: Nectar API Documentation
  version: 1.0.0 (v1)
  description: >-
    Complete API documentation for v2.2 endpoints to managing companies, sites,
    data, and documents
servers:
  - url: https://external.nectarclimate.com/v2.2
    description: Nectar API Server
security: []
paths:
  /company:
    post:
      tags:
        - Companies
      summary: Create Company
      description: >-
        Create a new company in the system. The authenticated user will be set
        as the admin for the newly created company. Additional users can be
        added during creation via the users field, or added later via the patch
        request. 


        **Note:** Users invited through the API must already have a Nectar
        account. If you provide email addresses of users who don't exist in the
        system, the request will fail with a 400 error.


        **Team Members:** All members of your team will automatically be added
        to the new company as admins.


        **Beta Features:**

        - `isDemandEnabled`: Enable tracking of electricity demand meters for
        advanced usage analytics.
      operationId: company_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CompanyCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CompanyCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      security:
        - ExternalAuthentication: []
components:
  schemas:
    CompanyCreateRequest:
      type: object
      description: Serializer for creating a new Company object.
      properties:
        externalId:
          type:
            - string
            - 'null'
          description: >-
            External identifier for the company. Used to associate company in
            Nectar with company within your database.
        name:
          type: string
          minLength: 1
          description: Name of the company.
          maxLength: 200
        dataCollectionStartDate:
          type: string
          format: date
          description: >-
            Date when data collection for the company begins. This is the date
            from which Nectar will pull historical data. Similar fields at the
            site and workflow level can override this date. Defaults to January
            1st of the previous year.
        isImpliedMeteringEnabled:
          type: boolean
          description: >-
            Indicates if implied metering is enabled for the company. Defaults
            to False.
        impliedMeteringFraction:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          description: >-
            Fraction used to estimate sewer usage from water usage for implied
            metering. If a sewage chargeis found in the data without water
            usage, this fraction is used to estimate the waste water usage that
            corresponds to the sewage charge. Defaults to 1.0.
        isDemandEnabled:
          type: boolean
          default: false
          description: >-
            [BETA] Enable tracking of electricity demand meters. When enabled,
            bills will be processed to extract demand usage data in addition to
            standard consumption data.
        isBasicIdentifierMappingEnabled:
          type: boolean
          description: >-
            Indicates if basic identifier name mapping is enabled for the
            company, in which case, meter identifiers will be labeled with a
            limited set of identifier types. When disabled (by default), the
            full range of identifier types is used for labeling.
        isLowAccuracyModeEnabled:
          type: boolean
          default: false
          description: >-
            Enable faster bill processing. When this is on, bills are processed
            more quickly, but with lower accuracy.
        users:
          type: array
          items:
            type: string
            format: email
            minLength: 1
          description: >-
            List of email addresses of users to set as company admins. If
            provided, these users will be added as admins along with the
            authenticated user. If not provided, only the authenticated user
            will be set as admin.
      required:
        - name
    Company:
      type: object
      description: >-
        Serializer for externally available fields of a Company object including
        related sites.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the company.
        externalId:
          type:
            - string
            - 'null'
          description: >-
            External identifier for the company. Used to associate company in
            Nectar with company within your database.
        name:
          type: string
          description: Name of the company.
          maxLength: 200
        dataCollectionStartDate:
          type: string
          format: date
          description: >-
            Date when data collection for the company begins. This is the date
            from which Nectar will pull historical data. Similar fields at the
            site and workflow level can override this date. Defaults to January
            1st of the previous year.
        isImpliedMeteringEnabled:
          type: boolean
          description: >-
            Indicates if implied metering is enabled for the company. Defaults
            to False.
        impliedMeteringFraction:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          description: >-
            Fraction used to estimate sewer usage from water usage for implied
            metering. If a sewage chargeis found in the data without water
            usage, this fraction is used to estimate the waste water usage that
            corresponds to the sewage charge. Defaults to 1.0.
        isDemandEnabled:
          type: boolean
          description: >-
            [BETA] Enable tracking of electricity demand meters. When enabled,
            bills will be processed to extract demand usage data in addition to
            standard consumption data.
        isBasicIdentifierMappingEnabled:
          type: boolean
          description: >-
            Indicates if basic identifier name mapping is enabled for the
            company, in which case, meter identifiers will be labeled with a
            limited set of identifier types. When disabled (by default), the
            full range of identifier types is used for labeling.
        isLowAccuracyModeEnabled:
          type: boolean
          description: >-
            Indicates if a lower accuracy, fast pass mode is forced for the
            company. When enabled, all bills will bypass checksum validation and
            go directly to submission. This provides faster processing but lower
            accuracy.
        sites:
          type: array
          items:
            $ref: '#/components/schemas/SiteSkeletonSerializerV2'
        users:
          type: array
          items:
            type: string
          description: List of user email addresses associated with the company.
      required:
        - id
        - isDemandEnabled
        - name
        - sites
        - users
    ErrorResponse:
      type: object
      description: Serializer for error responses.
      properties:
        detail:
          type: string
        error:
          type: string
    SiteSkeletonSerializerV2:
      type: object
      description: Skeleton serializer for externally available fields of a Site object.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the site.
        externalId:
          type:
            - string
            - 'null'
          description: >-
            ID of the site on external platforms used during exports. Used to
            associate site in Nectar with site within your database.
        name:
          type: string
          description: Name of the site.
          maxLength: 255
        address:
          type: string
          description: Address of the site.
          maxLength: 255
        path:
          type: array
          items:
            type: string
            maxLength: 100
          description: >-
            List of location tags in increasing specificity used to filter
            sites. Filters must be entered from more general to more specific.
            E.g. ['US', 'CA', 'ON']
          maxItems: 10
        occupancyPercent:
          type:
            - string
            - 'null'
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,4})?$
          description: >-
            Occupancy percent, must be a number from 0 to 100. Usage for the
            site will be multiplied by this value for specified connections.
        dataCollectionStopDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Date when data collection for this site was stopped. A non-null
            value indicates the site has been soft-deleted/archived.
      required:
        - dataCollectionStopDate
        - id
        - name
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````