---
title: "Send customer portal invitation"
method: POST
path: "/customer-portal/invitations/send"
tags: ["Customer Portal"]
---

# Send customer portal invitation

`POST /customer-portal/invitations/send`

## Request

- Base URL: `https://api2.autarc.energy/api/v1`
- URL: `https://api2.autarc.energy/api/v1/customer-portal/invitations/send`
- Auth: API key in header `X-Api-Key`

**Not available on the Go API yet.** Use the NestJS proxy (https://api2.autarc.energy/api/v1). Sends an invitation email to the customer associated with the given project, granting them access to the customer portal. The project must belong to the company identified by the API key and must have an assigned customer with a valid email address. If an invitation already exists for this project-customer pair, it will be re-sent with a new token.

## Request body

- SendInvitationRequest: Request body for sending a customer portal invitation. The company is inferred from the API key.
  - `projectId` string, uuid, required: ID of the project whose customer should be invited to the portal.
  - `subject` string, required: Subject line for the invitation email.
  - `message` string, required: Body message for the invitation email. Newlines are converted to HTML line breaks.

## Response `200`

A customer portal invitation

- CustomerPortalInvitation
  - `id` string, uuid
  - `company_id` string, uuid
  - `project_id` string, uuid
  - `customer_id` string, uuid
  - `status` 'sent' | 'active' | 'canceled'
  - `subject` string, nullable
  - `message` string, nullable
  - `token_version` number
  - `last_sent_at` string, date-time, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `deleted_at` string, date-time, nullable
  - `invited_email` string, email: The address the customer was invited at.

## Other responses

- `400`: Bad request — project has no customer, customer has no email, or company has no slug configured.
- `404`: The specified resource was not found

---

[API](https://skmtc.dev/autarc/apis/autarc-2-0-api.md) - [All operations](https://skmtc.dev/autarc/apis/autarc-2-0-api/llms.txt) - [OpenAPI document](https://skmtc.dev/autarc/apis/autarc-2-0-api/revisions/adfb20a40efc?raw)
