Skip to main content
POST
/
connection
/
company
/
{company_id}
/
link
Create Magic Link with Prefilled Data for Creating a Utility Account Connection
curl --request POST \
  --url https://external.nectarclimate.com/v2/connection/company/{company_id}/link \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "url": "<string>",
  "initialSites": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "utilityTypes": [
    "ELECTRICITY"
  ],
  "country": "AF",
  "connectionOwnerEmail": "[email protected]",
  "dataCollectionStartDate": "2023-12-25",
  "expiresInSeconds": 2
}
'
{
  "companyMagicLinkSecret": "<string>",
  "publicCompanyId": "<string>",
  "magicLinkUrl": "<string>"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

company_id
string<uuid>
required

Private ID of the company for which to generate the magic link.

Body

Serializer for creating a company-level magic link with optional prefill data and expiration.

url
string<uri>

Web address of the utility company's website to pre-populate in the connection form.

Maximum string length: 5000
initialSites
string<uuid>[]

List of site UUIDs to pre-populate in the connection form.

utilityTypes
enum<string>[]

List of utility types to pre-populate in the connection form (e.g., ELECTRICITY, GAS, WATER).

  • ELECTRICITY - Electricity
  • GAS - Gas
  • WATER - Water
  • DISTRICT - District
  • WASTE - Waste
  • FUEL - Fuel
  • MISC - Misc
  • REFRIGERANT - Refrigerant
  • SOLAR - Solar
  • TELECOM - Telecom
Available options:
ELECTRICITY,
GAS,
WATER,
DISTRICT,
WASTE,
FUEL,
MISC,
REFRIGERANT,
SOLAR,
TELECOM
country
enum<string>

Country of the utility company to pre-populate in the connection form.

  • AF - Af
  • AL - Al
  • DZ - Dz
  • AS - As
  • AD - Ad
  • AO - Ao
  • AI - Ai
  • AQ - Aq
  • AG - Ag
  • AR - Ar
  • AM - Am
  • AW - Aw
  • AU - Au
  • AT - At
  • AZ - Az
  • BS - Bs
  • BH - Bh
  • BD - Bd
  • BB - Bb
  • BY - By
  • BE - Be
  • BZ - Bz
  • BJ - Bj
  • BM - Bm
  • BT - Bt
  • BO - Bo
  • BQ - Bq
  • BA - Ba
  • BW - Bw
  • BV - Bv
  • BR - Br
  • IO - Io
  • BN - Bn
  • BG - Bg
  • BF - Bf
  • BI - Bi
  • KH - Kh
  • CM - Cm
  • CA - Ca
  • CV - Cv
  • KY - Ky
  • CF - Cf
  • TD - Td
  • CL - Cl
  • CN - Cn
  • CX - Cx
  • CC - Cc
  • CO - Co
  • KM - Km
  • CG - Cg
  • CD - Cd
  • CK - Ck
  • CR - Cr
  • HR - Hr
  • CU - Cu
  • CW - Cw
  • CY - Cy
  • CZ - Cz
  • CI - Ci
  • DK - Dk
  • DJ - Dj
  • DM - Dm
  • DO - Do
  • EC - Ec
  • EG - Eg
  • SV - Sv
  • GQ - Gq
  • ER - Er
  • EE - Ee
  • ET - Et
  • FK - Fk
  • FO - Fo
  • FJ - Fj
  • FI - Fi
  • FR - Fr
  • GF - Gf
  • PF - Pf
  • TF - Tf
  • GA - Ga
  • GM - Gm
  • GE - Ge
  • DE - De
  • GH - Gh
  • GI - Gi
  • GR - Gr
  • GL - Gl
  • GD - Gd
  • GP - Gp
  • GU - Gu
  • GT - Gt
  • GG - Gg
  • GN - Gn
  • GW - Gw
  • GY - Gy
  • HT - Ht
  • HM - Hm
  • VA - Va
  • HN - Hn
  • HK - Hk
  • HU - Hu
  • IS - Is
  • IN - In
  • ID - Id
  • IR - Ir
  • IQ - Iq
  • IE - Ie
  • IM - Im
  • IL - Il
  • IT - It
  • JM - Jm
  • JP - Jp
  • JE - Je
  • JO - Jo
  • KZ - Kz
  • KE - Ke
  • KI - Ki
  • KP - Kp
  • KR - Kr
  • KW - Kw
  • KG - Kg
  • LA - La
  • LV - Lv
  • LB - Lb
  • LS - Ls
  • LR - Lr
  • LY - Ly
  • LI - Li
  • LT - Lt
  • LU - Lu
  • MO - Mo
  • MK - Mk
  • MG - Mg
  • MW - Mw
  • MY - My
  • MV - Mv
  • ML - Ml
  • MT - Mt
  • MH - Mh
  • MQ - Mq
  • MR - Mr
  • MU - Mu
  • YT - Yt
  • MX - Mx
  • FM - Fm
  • MD - Md
  • MC - Mc
  • MN - Mn
  • ME - Me
  • MS - Ms
  • MA - Ma
  • MZ - Mz
  • MM - Mm
  • NA - Na
  • NR - Nr
  • NP - Np
  • NL - Nl
  • NC - Nc
  • NZ - Nz
  • NI - Ni
  • NE - Ne
  • NG - Ng
  • NU - Nu
  • NF - Nf
  • MP - Mp
  • NO - No
  • OM - Om
  • PK - Pk
  • PW - Pw
  • PS - Ps
  • PA - Pa
  • PG - Pg
  • PY - Py
  • PE - Pe
  • PH - Ph
  • PN - Pn
  • PL - Pl
  • PT - Pt
  • PR - Pr
  • QA - Qa
  • RO - Ro
  • RU - Ru
  • RW - Rw
  • RE - Re
  • BL - Bl
  • SH - Sh
  • KN - Kn
  • LC - Lc
  • MF - Mf
  • PM - Pm
  • VC - Vc
  • WS - Ws
  • SM - Sm
  • ST - St
  • SA - Sa
  • SN - Sn
  • RS - Rs
  • SC - Sc
  • SL - Sl
  • SG - Sg
  • SX - Sx
  • SK - Sk
  • SI - Si
  • SB - Sb
  • SO - So
  • ZA - Za
  • GS - Gs
  • SS - Ss
  • ES - Es
  • LK - Lk
  • SD - Sd
  • SR - Sr
  • SJ - Sj
  • SZ - Sz
  • SE - Se
  • CH - Ch
  • SY - Sy
  • TW - Tw
  • TJ - Tj
  • TZ - Tz
  • TH - Th
  • TL - Tl
  • TG - Tg
  • TK - Tk
  • TO - To
  • TT - Tt
  • TN - Tn
  • TR - Tr
  • TM - Tm
  • TC - Tc
  • TV - Tv
  • UG - Ug
  • UA - Ua
  • AE - Ae
  • GB - Gb
  • US - Us
  • UM - Um
  • UY - Uy
  • UZ - Uz
  • VU - Vu
  • VE - Ve
  • VN - Vn
  • VG - Vg
  • VI - Vi
  • WF - Wf
  • EH - Eh
  • YE - Ye
  • ZM - Zm
  • ZW - Zw
  • AX - Ax
Available options:
AF,
AL,
DZ,
AS,
AD,
AO,
AI,
AQ,
AG,
AR,
AM,
AW,
AU,
AT,
AZ,
BS,
BH,
BD,
BB,
BY,
BE,
BZ,
BJ,
BM,
BT,
BO,
BQ,
BA,
BW,
BV,
BR,
IO,
BN,
BG,
BF,
BI,
KH,
CM,
CA,
CV,
KY,
CF,
TD,
CL,
CN,
CX,
CC,
CO,
KM,
CG,
CD,
CK,
CR,
HR,
CU,
CW,
CY,
CZ,
CI,
DK,
DJ,
DM,
DO,
EC,
EG,
SV,
GQ,
ER,
EE,
ET,
FK,
FO,
FJ,
FI,
FR,
GF,
PF,
TF,
GA,
GM,
GE,
DE,
GH,
GI,
GR,
GL,
GD,
GP,
GU,
GT,
GG,
GN,
GW,
GY,
HT,
HM,
VA,
HN,
HK,
HU,
IS,
IN,
ID,
IR,
IQ,
IE,
IM,
IL,
IT,
JM,
JP,
JE,
JO,
KZ,
KE,
KI,
KP,
KR,
KW,
KG,
LA,
LV,
LB,
LS,
LR,
LY,
LI,
LT,
LU,
MO,
MK,
MG,
MW,
MY,
MV,
ML,
MT,
MH,
MQ,
MR,
MU,
YT,
MX,
FM,
MD,
MC,
MN,
ME,
MS,
MA,
MZ,
MM,
NA,
NR,
NP,
NL,
NC,
NZ,
NI,
NE,
NG,
NU,
NF,
MP,
NO,
OM,
PK,
PW,
PS,
PA,
PG,
PY,
PE,
PH,
PN,
PL,
PT,
PR,
QA,
RO,
RU,
RW,
RE,
BL,
SH,
KN,
LC,
MF,
PM,
VC,
WS,
SM,
ST,
SA,
SN,
RS,
SC,
SL,
SG,
SX,
SK,
SI,
SB,
SO,
ZA,
GS,
SS,
ES,
LK,
SD,
SR,
SJ,
SZ,
SE,
CH,
SY,
TW,
TJ,
TZ,
TH,
TL,
TG,
TK,
TO,
TT,
TN,
TR,
TM,
TC,
TV,
UG,
UA,
AE,
GB,
US,
UM,
UY,
UZ,
VU,
VE,
VN,
VG,
VI,
WF,
EH,
YE,
ZM,
ZW,
AX
connectionOwnerEmail
string<email>

Email address of the connection owner to pre-populate in the connection form.

Minimum string length: 1
dataCollectionStartDate
string<date>

Start date for data collection to pre-populate in the connection form.

expiresInSeconds
integer

Number of seconds until the magic link expires. If not provided, the link will not expire.

Required range: x >= 1

Response

Serializer for body fields for company magic link creation.

Secret key used for magic link validation for company-level magic links.

publicCompanyId
string
required

Public exposed ID of the company requesting the magic link. This ID may be exposed to unauthenticated users when displaying the magic link, so a seprate ID is used.

URL to magic link for creating the connection.