Sites

Invite a manager to a site

If the user already exists, grants SiteManager access immediately and no invitation is created (so no mail is sent). Otherwise creates a pending invitation.

name is only required for an email that is not yet a user — it is what the invitation is addressed to. For an existing user it is ignored, since no invitation is written.

Requires one of the following roles: ResellerAdmin, DomainManager, SiteManager, Installer.

post/sites/{id}/managers

Request

  • Base URL: https://api.heycharge.com/v1/b2b
  • URL: https://api.heycharge.com/v1/b2b/sites/{id}/managers
  • Auth: HTTP bearer

Path parameters

idstring required

Site ID

Headers

b2bidstring

BackofficeAdmin only. Specifies the target B2B ID when acting on behalf of a B2B. For regular users this header is ignored — the B2B from the JWT is always used.

Request body

emailstring email required
namestring

Optional, and required only for an email that is not yet a user — otherwise the call returns 400 with code: 5. For an existing user it is ignored, since access is granted without writing an invitation.

Response

User updated (if they exist) or invitation created (if they do not).

Changes

No recorded changes to this operation across all 1 revision of this API.