1. Docs
  2. API Reference
  3. Create an invite

Create an invite

POST/portal/v1/accounts/{accountSlug}/user-invites

Authentication

  • Bearer Token Authorization

    JWT access token

Request body

  • emailstring*
  • first_namestring*
  • last_namestring*

Code samples

cURLJavaScriptPythonGo
curl -X POST "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/user-invites" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "string",
    "first_name": "string",
    "last_name": "string"
  }'

Responses

201 Invite created
{
  "id": "string",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "name": "string",
  "status": "pending",
  "expires_at": "2026-04-20T12:00:00.000Z",
  "invited_by": "string",
  "created_at": "2026-04-20T12:00:00.000Z"
}

application/json

  • idstring*
  • emailstring*
  • first_namestring*
  • last_namestring*
  • namestring*
  • statusenum: "pending" | "accepted" | "revoked" | "expired"*
  • expires_atstring (date-time)*
  • invited_bystring*
  • created_atstring (date-time)*
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)

Returned object

On this page

Related endpoints

GETList invites
GETGet invite summary
POSTResend an invite
DELETERevoke an invite