---
allOf:
  - $ref: core-event-schema/state_event.yaml
description: Defines the relationship of a child room to a space-room. Has no effect in rooms which are not [spaces](#spaces).
properties:
  content:
    properties:
      via:
        type: array
        description: |-
          A list of servers to try and join through. See also: [Routing](/appendices/#routing).

          When not present or invalid, the child room is not considered to be part of the space.
        items:
          type: string
      order:
        type: string
        maxLength: 50
        pattern: '^[\x20-\x7E]+$'
        description: |-
          Optional string to define ordering among space children. These are lexicographically
          compared against other children's `order`, if present.

          Must consist of ASCII characters within the range `\x20` (space) and `\x7E` (`~`),
          inclusive. Must not exceed 50 characters.

          `order` values with the wrong type, or otherwise invalid contents, are to be treated
          as though the `order` key was not provided.

          See [Ordering of children within a space](/client-server-api/#ordering-of-children-within-a-space) for information on how the ordering works.
      suggested:
        type: boolean
        description: |-
          Optional (default `false`) flag to denote whether the child is "suggested" or of interest
          to members of the space. This is primarily intended as a rendering hint for clients to
          display the room differently, such as eagerly rendering them in the room list.
    required:
      - via
    type: object
  state_key:
    description: The child room ID being described.
    type: string
  type:
    enum:
      - m.space.child
    type: string
title: Space child room
type: object
