Invite a user to an organization

2 minute read

Use the organization Invites API to invite one or more users to join an organization. You can optionally add invitees to one or more teams.

All requests must be authenticated with a personal access token (PAT) that has permission to invite users to the organization. To generate a PAT, refer to Personal access tokens.

Invite users to an organization

Use this endpoint to invite one or more users to an organization. Optionally include team IDs to auto-add invitees to specific teams.

Endpoint
POST /v3/organizations/{organizationId}/teams/invites
Table 1. Requests headers
Header Value

Authorization

Bearer <YOUR_PAT>

Content-Type

application/json

Table 2. Path parameters
Parameter name In Type Required? Description

organizationId

Path

String

Yes

The ID of the organization

Table 3. Request body
Field In Type Required? Description

emails

Body

Array of strings

Yes

Email addresses to invite

teamIds

Body

Array of strings

No

Optional team IDs to add invitees to upon acceptance

Example request (invite two users and add them to two teams)
POST /v3/organizations/{organizationId}/teams/invites Authorization: Bearer <YOUR_PAT> Content-Type: application/json { "emails": ["user1@example.com", "user2@example.com"], "teamIds": ["team-123", "team-456"] }

Responses

The table below summarizes possible responses, including status codes, meanings, and response schemas.

Status Code Description Schema

200

Success. List of sent invitations

api.auth.CreateInvitesV3Response

Default

Error. Occurs if the request is malformed, unauthorized, or if the requester lacks permission.

google.rpc.Status

Response example
{ "invites": [ { "id": "inv-abc123", "email": "user1@example.com", "team_id": "team-123", "team_role": "member", "redirectUrl": "https://example.com/accept?token=...", "expirationDate": "2025-09-30T12:34:56Z", "is_autogenerated": false, "audit": { "who": "admin@example.com", "why": "Q4 rollout", "when": "2025-09-19T10:00:00Z" } } ] }

List teams to use with invites

If you want to add invitees to specific teams and don’t know the team IDs, use this endpoint to list teams in the organization.

Endpoint
GET /v1/organizations/{organization_id}/teams
Table 4. Path parameters
Parameter name In Type Required? Description

organization_id

Path

String

Yes

The ID of the organization or sub-organization.

Responses

Status Code Description Schema

200

Success. List of teams in the organization

api.auth.GetTeamsResponse

Default

Error. Occurs if the request is malformed, unauthorized, or if the requester lacks permission.

google.rpc.Status