{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-create-room-request-schema.json",
  "title": "CreateRoomRequest",
  "description": "Request payload for creating new room.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-rooms-api-openapi.yml#/components/schemas/CreateRoomRequest",
  "type": "object",
  "properties": {
    "validFrom": {
      "format": "date-time",
      "description": "The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time.",
      "type": "string"
    },
    "validUntil": {
      "format": "date-time",
      "description": "The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time plus 180 days.",
      "type": "string"
    },
    "pstnDialOutEnabled": {
      "description": "Set this flag to true if, at the time of the call, dial out to a PSTN number is enabled in a particular room. By default, this flag is set to false.",
      "type": "boolean"
    },
    "participants": {
      "description": "(Optional) Participants to be invited to the room.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ParticipantProperties"
      }
    }
  },
  "$defs": {
    "ParticipantProperties": {
      "required": [
        "role"
      ],
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/Role"
        }
      }
    },
    "Role": {
      "description": "The role of a room participant. The default value is Attendee.",
      "enum": [
        "Presenter",
        "Attendee",
        "Consumer",
        "Collaborator"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "Role",
        "modelAsString": true
      }
    }
  }
}