{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/mongodb/main/json-schema/mongodb-organization-invitation-request-schema.json",
  "title": "OrganizationInvitationRequest",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mongodb-organizations-api-openapi.yml#/components/schemas/OrganizationInvitationRequest",
  "properties": {
    "groupRoleAssignments": {
      "description": "List of projects that the user will be added to when they accept their invitation to the organization.",
      "items": {
        "$ref": "#/$defs/OrganizationInvitationGroupRoleAssignmentsRequest"
      },
      "type": "array"
    },
    "roles": {
      "description": "One or more organization level roles to assign to the MongoDB Cloud user.",
      "items": {
        "enum": [
          "ORG_OWNER",
          "ORG_MEMBER",
          "ORG_GROUP_CREATOR",
          "ORG_BILLING_ADMIN",
          "ORG_BILLING_READ_ONLY",
          "ORG_STREAM_PROCESSING_ADMIN",
          "ORG_READ_ONLY"
        ],
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "teamIds": {
      "description": "List of teams to which you want to invite the desired MongoDB Cloud user.",
      "items": {
        "description": "Unique 24-hexadecimal digit string that identifies the team.",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "username": {
      "description": "Email address that belongs to the desired MongoDB Cloud user.",
      "format": "email",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "OrganizationInvitationGroupRoleAssignmentsRequest": {
      "properties": {
        "groupId": {
          "description": "Unique 24-hexadecimal digit string that identifies the project to which these roles belong.",
          "pattern": "^([a-f0-9]{24})$",
          "type": "string"
        },
        "roles": {
          "description": "One or more project-level roles to assign to the MongoDB Cloud user.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        }
      },
      "type": "object"
    }
  }
}