---
title: "Invite a member to the organization"
method: POST
path: "/v1/organizations/{organization_id}/invites/"
tags: ["organizations"]
---

# Invite a member to the organization

`POST /v1/organizations/{organization_id}/invites/`

## Request

- Base URL: `https://api.ethiack.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ethiack.com/v1/organizations/{organization_id}/invites/`
- Auth: none declared

Issue a member invite and send its email.

Args:
    organization_id (int): Identifier of the parent organization.
    body (CreateOrganizationInviteRequest): Invitee email + role.
    db (AsyncSession): Request-scoped database session.
    context (ActiveContext): Resolved caller identity and scope.

Returns:
    OrganizationInviteResponse: The issued invite (never the token).

## Path parameters

- `organization_id` integer, required

## Request body

- CreateOrganizationInviteRequest: Body for ``POST /v1/organizations/{id}/invites``. Attributes: email (EmailStr): Invitee email address. role (OrganizationRole): Membership role granted on redemption; must be an invitable role (``owner`` is rejected).
  - `email` string, email, required
  - `role` 'owner' | 'admin' | 'analyst' | 'viewer', required: Sub-role within a :data:`ActorKind.ORGANIZATION` context. Snake_case wire values are used in the DB, in JWT claims synced from Zitadel, and as components of Cerbos role strings (e.g. ``"org_admin"``). Attributes: OWNER: Full authority over the organization. ADMIN: Administrative authority below the owner. ANALYST: Read and write on engagements, findings, assets. VIEWER: Read-only.

## Response `201`

Successful Response

- OrganizationInviteResponse: An organization invite as managers see it (never the token). Attributes: organization_id (int): Target organization. role (OrganizationRole): Membership role granted on redemption.
  - `id` integer, required
  - `kind` 'organization' | 'partner' | 'triager', required: Which user kind an account invite grants on redemption. Doubles as the joined-table-inheritance discriminator: ``TRIAGER`` is the base :class:`Invite` (no grant payload); ``ORGANIZATION`` / ``PARTNER`` select the typed child. Attributes: ORGANIZATION: Membership in the invite's organization. PARTNER: Membership in the invite's partner. TRIAGER: The triager kind (platform-scoped, no payload).
  - `email` string, required
  - `status` 'pending' | 'redeemed' | 'revoked', required: The single terminal-state of an invite's lifecycle. A live invite is ``PENDING``; it moves once, irreversibly, to exactly one terminal state. Modelling this as one enum (rather than separate per-outcome timestamps) makes "redeemed AND revoked" unrepresentable rather than merely constraint-guarded, and mirrors :class:`~phoenix.db.models.pentest_hacker_invite.PentestHackerInviteStatus`. Expiry is NOT a member — it is passive and time-derived from ``expires_at``. Attributes: PENDING: Live and awaiting redemption (paired with a null ``resolved_at``). REDEEMED: Consumed by its invitee. REVOKED: Rescinded by a manager before redemption.
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, required
  - `resolved_at` string, date-time, nullable, required
  - `redeemed_by_user_id` string, nullable, required
  - `expired` boolean, required
  - `live` boolean, required
  - `organization_id` integer, required
  - `role` 'owner' | 'admin' | 'analyst' | 'viewer', required: Sub-role within a :data:`ActorKind.ORGANIZATION` context. Snake_case wire values are used in the DB, in JWT claims synced from Zitadel, and as components of Cerbos role strings (e.g. ``"org_admin"``). Attributes: OWNER: Full authority over the organization. ADMIN: Administrative authority below the owner. ANALYST: Read and write on engagements, findings, assets. VIEWER: Read-only.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ethiack/apis/ethiack-api.md) - [All operations](https://skmtc.dev/ethiack/apis/ethiack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ethiack/apis/ethiack-api/revisions/4eaba89bfebf?raw)
