{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rumoro-dev/json-schema/rumoro-dev-invitation-schema.json",
  "title": "Invitation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rumoro-dev-members-api-openapi.yml#/components/schemas/Invitation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The invitation's id (inv_...)."
    },
    "email": {
      "type": "string",
      "description": "The email address invited, in lowercase."
    },
    "role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "member"
      ],
      "description": "The role they get when they join."
    },
    "invitedBy": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "email",
        "name"
      ],
      "description": "The member who sent it. Invitations sent with an API key come from the oldest owner."
    },
    "expiresAt": {
      "type": "string",
      "description": "When the invitation expires, 48 hours after it was sent. Expired invitations are not listed."
    },
    "createdAt": {
      "type": "string",
      "description": "When it was sent."
    }
  },
  "required": [
    "id",
    "email",
    "role",
    "invitedBy",
    "expiresAt",
    "createdAt"
  ]
}