---
title: "Create org-less user invitation (Terraform)"
method: POST
path: "/internal/v1/invites"
tags: ["Users"]
---

# Create org-less user invitation (Terraform)

`POST /internal/v1/invites`

Top-level invite endpoint used by Terraform to pre-create a User row without attaching org membership. Requires authentication only. The body accepts only `email`. If the email already maps to a confirmed User, the response includes a compact invite summary with status `accepted`; no invite row is inserted. Otherwise the endpoint ensures a User row exists with `email_confirmed=false`, persists or reuses a sent invite row, and sends an account invitation email when a new or reactivated invite is created. Caller can then attach org membership separately via POST /orgs/{org_id}/users.

## Request body

- OrglessUserInviteCreateRequest — Body for the top-level POST /invites (Terraform path). Only `email` is accepted; `role` and `teamIds` would be meaningless without an org.
  - `email` string, required — Email address of the invitee. Required; trimmed and lowercased server-side.

## Response `200`

Invitation processed.

- UserInviteResponse — Response from creating or processing an invitation. `user` is a public invitee summary. `invite` is a compact invite summary; `invite.status` is `sent` for pending invitations and `accepted` when the email already maps to a confirmed user. `invite.id` is the persisted invite ID for pending invites and a response-only random ID for already-confirmed users. `invite.orgId` is present for org-scoped actions; when `invite.status` is `accepted` and `invite.orgId` is present, the confirmed user was attached to that org.
  - `user` PublicUser, required — Safe user summary for UI display.
    - `id` integer, required
    - `name` string, required
    - `avatar` string, required — URL to the user's avatar image.
  - `invite` InviteSummary, required — Compact invite summary returned from create-invite endpoints.
    - `id` string, required — 32-character hex trace ID.
    - `status` 'sent' | 'accepted' | 'canceled' | 'expired', required — Lifecycle status of an organization invitation.
    - `orgId` integer — Present for org-scoped invite actions.

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `500` — Internal server error

---

[API](https://skmtc.net/uptrace/apis/uptrace-json-api.md) · [All operations](https://skmtc.net/uptrace/apis/uptrace-json-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uptrace/uptrace-json-api/versions/550c8881ab9a/schema)
