{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudtruth/json-schema/cloudtruth-invitation-public-schema.json",
  "title": "InvitationPublic",
  "description": "Serializer for the unauthenticated invite landing page that shows an\ninvitee what they're being invited to before they sign in or create\nan account. Returns only the fields needed to render that page — no\nhyperlinks requiring auth context, no membership references. The\ninvitee's own email is included because they already know it (the\nlink came in their inbox) and the landing page renders \"invited as\n<email>\" to confirm they're acting on the right invitation.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudtruth-invitations-api-openapi.yml#/components/schemas/InvitationPublic",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true,
      "description": "The unique identifier of an invitation."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "The email address of the user to be invited.",
      "maxLength": 254
    },
    "role": {
      "allOf": [
        {
          "$ref": "#/$defs/RoleEnum"
        }
      ],
      "description": "The role that the user will have in the organization, should the user accept.\n\n* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
    },
    "role_label": {
      "type": "string",
      "readOnly": true,
      "description": "Human-readable role label (the underlying value is in `role`)."
    },
    "inviter_name": {
      "type": "string",
      "readOnly": true,
      "description": "The name of the user that created the invitation."
    },
    "organization_id": {
      "type": "string",
      "readOnly": true,
      "description": "UUID of the organization. Used by the landing page to construct the post-login accept URL."
    },
    "organization_name": {
      "type": "string",
      "readOnly": true,
      "description": "Display name of the organization extending the invitation."
    },
    "auth0_organization_id": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Auth0 Organization ID to pass as the `organization` parameter when redirecting the invitee to Auth0. Only populated when the organization has SSO enabled — the accept endpoint requires an org-scoped Auth0 login in that case; non-SSO logins must not be org-scoped or Auth0 may reject connections not enabled for the org."
    },
    "state": {
      "type": "string",
      "readOnly": true,
      "description": "The current state of the invitation."
    }
  },
  "required": [
    "auth0_organization_id",
    "email",
    "id",
    "inviter_name",
    "organization_id",
    "organization_name",
    "role",
    "role_label",
    "state"
  ],
  "$defs": {
    "RoleEnum": {
      "enum": [
        "OWNER",
        "ADMIN",
        "CONTRIB",
        "VIEWER",
        "NO_SECRETS"
      ],
      "type": "string",
      "description": "* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
    }
  }
}