Skip to main content
Available on Enterprise plans. An organization without an Enterprise plan is refused with HTTP 402 and the error code enterprise_plan_required. Self-hosted deployments need an Enterprise license for the same endpoints. To enable it, reach out to enterprise@langwatch.ai.

Intro

The Invites API creates the invitations people accept to join your organization, up to 50 in one call. Each invite carries the organization role the person gets and the teams they land on, so someone who accepts is immediately where they need to be. Accepting stays a browser step: the person opens the link, signs in or signs up, and joins. This API covers the other three quarters of the job, creating, listing, and revoking.

Authentication

Requires an organization-level API key with organization:manage. Pass it as a Bearer token:

Endpoints

Every invite comes back with its inviteCode and a ready inviteUrl. A deployment with no email provider configured still has something to hand the person, and emailNotSent tells you, per invite, whether LangWatch managed to deliver the mail itself.

The batch is all or nothing

Validation runs over the whole batch before anything is written, and a problem refuses the batch rather than creating part of it. This is deliberate: silently granting someone less access than the call asked for is worse than an error you can read. The refusals to expect:

Typical flow

Someone who never accepts leaves a pending invite behind. List them, then revoke the ones that have gone stale: