Minctrl Docs

Invite a member by email

POST
/companies/{company_id}/members

Invite a member by email.

Requires a valid bearer token and the member.invite capability on the company. Company-scoped to the company_id in the path.

Behaviour:

  • If a user with that email exists → use their id (active or shadow).
  • Otherwise → create a shadow user (status='pending', no password).
  • Either way, upsert a membership row with status='pending'.
  • Generate a one-time invitation token (URL-safe random) with 7-day TTL.
  • Send invitation email via Resend (best-effort — fails open if no key).
  • Return token in the response so the admin can copy/share manually even if email failed.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

company_id*Company Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body to invite a member by email.

Response Body

application/json

application/json

curl -X POST "https://example.com/companies/string/members" \  -H "Content-Type: application/json" \  -d '{    "email": "teammate@example.com",    "role": "member"  }'
null
Empty
Empty
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string",      "input": null,      "ctx": {}    }  ]}