> ## 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 Magic Link for Creating a Utility Account Connection

> **Deprecated:** Use `POST /invitation/company/{company_id}` instead. This endpoint will be removed in a future API version.

Generates a Nectar signed secret for a specific company. This endpoint provides a secure way to generate a magic link for connecting a utility account to a company.



## OpenAPI

````yaml /api-reference/openapi-v2-2.json get /connection/company/{company_id}/link
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:
  /connection/company/{company_id}/link:
    get:
      tags:
        - Connections
      summary: Create Magic Link for Creating a Utility Account Connection
      description: >-
        **Deprecated:** Use `POST /invitation/company/{company_id}` instead.
        This endpoint will be removed in a future API version.


        Generates a Nectar signed secret for a specific company. This endpoint
        provides a secure way to generate a magic link for connecting a utility
        account to a company.
      operationId: connection_company_link_retrieve
      parameters:
        - in: path
          name: company_id
          schema:
            type: string
            format: uuid
          description: Private ID of the company for which to generate the magic link.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyMagicLink'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '403':
          description: 'Forbidden: Access to the company is denied.'
      deprecated: true
      security:
        - ExternalAuthentication: []
components:
  schemas:
    CompanyMagicLink:
      type: object
      description: >-
        Deprecated — use the invitation endpoints instead. Response body for
        company magic link creation.
      properties:
        companyMagicLinkSecret:
          type: string
          description: >-
            Deprecated — use the invitation system instead. Secret key used for
            magic link validation for company-level magic links.
        publicCompanyId:
          type: string
          description: >-
            Deprecated — use the invitation system instead. Public ID of the
            company used in magic link URLs.
        magicLinkUrl:
          type: string
          description: >-
            Deprecated — use invitationUrl from the invitation endpoints
            instead. URL to magic link for creating the connection.
      required:
        - companyMagicLinkSecret
        - magicLinkUrl
        - publicCompanyId
    ErrorResponse:
      type: object
      description: Serializer for error responses.
      properties:
        detail:
          type: string
        error:
          type: string
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````