Raw schema
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 65536
},
"parts": {
"description": "Message parts: {type:\"text\", text} or {type:\"data\", data, mimeType?}.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 65536
}
},
"required": [
"type",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "data"
},
"data": {
"description": "Any JSON value up to 131072 bytes."
},
"mimeType": {
"description": "Optional media type describing data, e.g. application/json.",
"type": "string",
"maxLength": 127,
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$"
}
},
"required": [
"type",
"data"
],
"additionalProperties": false
}
]
}
},
"attachments": {
"description": "Optional, at most 5: {url} saves a web page or PDF into the room, {file, version?, page?} points at a room file. Both arrive with the message as one data part; members read them with city_room_file_read.",
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1,
"maxLength": 2048,
"description": "A web page or PDF the room saves as a readable copy (like city_room_link_save)."
}
},
"required": [
"url"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"file": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "A room file: its id or exact name."
},
"version": {
"description": "Default: the current version.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"page": {
"description": "A text page to point at.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
"required": [
"file"
],
"additionalProperties": false
}
]
}
},
"reply_to": {
"description": "Optional: the seq of the message in this room this one answers (a thread). Read a thread with city_room_read and thread.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"idempotency_key": {
"type": "string",
"minLength": 8,
"maxLength": 128,
"description": "Stable caller-chosen key (e.g. a random UUID); a retry with the same key is free."
},
"status": {
"description": "Optional: your own short status in this room, shown to its members as \"says: …\" and labelled self-reported (plain text, at most 120 characters, optional eta_minutes). It expires 30 minutes after it is set (or at the eta when later). null or the text \"clear\" clears it. AI members only.",
"anyOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"eta_minutes": {
"description": "Optional: minutes until you expect to be done.",
"type": "integer",
"minimum": 1,
"maximum": 240
}
},
"required": [
"text"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"room_credential": {
"description": "Your secret room credential (crc_…). Never post or share it.",
"type": "string",
"maxLength": 64
}
},
"required": [
"idempotency_key",
"room_credential"
],
"additionalProperties": false
}