{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getoneprofile-ai/json-schema/getoneprofile-ai-workspace-chat-message-create-schema-schema.json",
  "title": "WorkspaceChatMessageCreateSchema",
  "description": "Send the AI Assistant a message.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getoneprofile-ai-assistant-api-openapi.yml#/components/schemas/WorkspaceChatMessageCreateSchema",
  "properties": {
    "attachment_ids": {
      "description": "The files sent with this message, as the attachments route returned them when they were uploaded: CSV, Excel or PDF, each of them yours and not yet sent with another message. The assistant reads a spreadsheet's columns and rows and a PDF's pages. Optional.",
      "items": {
        "format": "uuid",
        "type": "string"
      },
      "maxItems": 10,
      "title": "Attachment Ids",
      "type": "array"
    },
    "page": {
      "anyOf": [
        {
          "$ref": "#/$defs/PageContextSchema-Input"
        },
        {
          "type": "null"
        }
      ],
      "description": "What you have open, so the assistant can resolve 'this table' without you naming it. Optional."
    },
    "pasted": {
      "anyOf": [
        {
          "items": {
            "maxLength": 200,
            "type": "string"
          },
          "maxItems": 1000,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "A list you pasted rather than typed: domains, emails, names, one per entry. Sent as data instead of prose, so the assistant reads it as a list and the conversation shows it as a count rather than a wall of text. Optional.",
      "title": "Pasted"
    },
    "prompt": {
      "maxLength": 4000,
      "minLength": 1,
      "title": "Prompt",
      "type": "string"
    },
    "quote": {
      "anyOf": [
        {
          "maxLength": 2000,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Part of an earlier reply you selected, sent with your words so the assistant knows what they refer to. Kept with the message and shown above it in the conversation. Optional.",
      "title": "Quote"
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object",
  "$defs": {
    "OnScreenDraftSchema": {
      "additionalProperties": false,
      "description": "Words in an open box on the page: a reply, a task's message, an agent's form.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "pattern": "^[\\w-]{1,64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "kind": {
          "description": "\"reply\", \"task_message\", \"agent\", \"sender_settings\"…",
          "pattern": "^[a-z][a-z_ ]{0,63}$",
          "title": "Kind",
          "type": "string"
        },
        "text": {
          "anyOf": [
            {
              "maxLength": 8000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Text"
        },
        "unsaved": {
          "default": false,
          "description": "Whether the box holds words not yet saved.",
          "title": "Unsaved",
          "type": "boolean"
        }
      },
      "required": [
        "kind"
      ],
      "title": "OnScreenDraftSchema",
      "type": "object"
    },
    "OnScreenKind": {
      "description": "Which shape of page state a message's ``on_screen`` holds: the page it was read off.\n\nA closed set, because each kind has a reader in the dashboard\n(``components/assistant/onScreen/``) and a renderer here\n(``on_screen.py``): a new one is added in both, in one change.",
      "enum": [
        "lead_search",
        "table",
        "table_list",
        "trash",
        "sequence_list",
        "sequence_audience",
        "sequence_writing",
        "sequence_builder",
        "sequence_analytics",
        "sequence_settings",
        "agent_list",
        "agent_editor",
        "agent_preview",
        "sender_list",
        "mailbox_list",
        "sender_activity",
        "sender_settings",
        "sender_mailboxes",
        "sender_linkedin",
        "mailbox_detail",
        "inbox",
        "tasks",
        "usage",
        "do_not_contact",
        "subdomain_search",
        "lead_finders",
        "integration_directory",
        "integration_wizard",
        "business_context",
        "cooldown",
        "notification_settings",
        "assistant_settings",
        "connections",
        "referrals",
        "api_keys",
        "billing",
        "credit_calculator",
        "design_partner",
        "superadmin"
      ],
      "title": "OnScreenKind",
      "type": "string"
    },
    "OnScreenOpenSchema": {
      "additionalProperties": false,
      "description": "One thing open on the page: what \"this\" means.",
      "properties": {
        "id": {
          "pattern": "^[\\w-]{1,64}$",
          "title": "Id",
          "type": "string"
        },
        "kind": {
          "description": "\"row\", \"cell\", \"column\", \"contact\", \"task\"…",
          "pattern": "^[a-z][a-z_ ]{0,63}$",
          "title": "Kind",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "parent_id": {
          "anyOf": [
            {
              "pattern": "^[\\w-]{1,64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What it sits in, when its id alone does not say: a cell's row.",
          "title": "Parent Id"
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "title": "OnScreenOpenSchema",
      "type": "object"
    },
    "OnScreenRangeSchema": {
      "additionalProperties": false,
      "description": "The dates a page reads over: a preset, or the first and last day.",
      "properties": {
        "from": {
          "anyOf": [
            {
              "format": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From"
        },
        "preset": {
          "anyOf": [
            {
              "maxLength": 64,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Preset"
        },
        "to": {
          "anyOf": [
            {
              "format": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "To"
        }
      },
      "title": "OnScreenRangeSchema",
      "type": "object"
    },
    "OnScreenSchema": {
      "additionalProperties": false,
      "description": "What the page shows beyond its address and names, so a change starts from it.\n\nEvery part optional: a page sends what it has. The filters are in the\nvocabulary of the tool ``filters_as`` names, so the model can call that\ntool with them changed by exactly what was asked. Kept with the message,\nso bounded as a whole (``ON_SCREEN_MAX_BYTES``) as well as part by part.",
      "properties": {
        "draft": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenDraftSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "extra": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "Small facts only this kind of page keeps.",
          "title": "Extra"
        },
        "filters": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "The page's filters, in the vocabulary `filters_as` names.",
          "title": "Filters"
        },
        "filters_as": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_]{0,63}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The tool whose arguments the filters are spelled as, e.g. `find_people`.",
          "title": "Filters As"
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "anyOf": [
            {
              "minimum": 0.0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "A finder's row limit.",
          "title": "Limit"
        },
        "open": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/OnScreenOpenSchema"
              },
              "maxItems": 4,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Open"
        },
        "range": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenRangeSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "search": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What the page's search box holds.",
          "title": "Search"
        },
        "selection": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenSelectionSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "sort": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/OnScreenSortSchema"
              },
              "maxItems": 8,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sort"
        },
        "view": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenViewSchema"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "title": "OnScreenSchema",
      "type": "object"
    },
    "OnScreenSelectionSchema": {
      "additionalProperties": false,
      "description": "What the person ticked on the page: what \"these\" and \"the selected\" mean.",
      "properties": {
        "all_matching": {
          "default": false,
          "description": "Whether every row the page's filter matches is ticked, less `excluded_ids`.",
          "title": "All Matching",
          "type": "boolean"
        },
        "count": {
          "default": 0,
          "description": "How many are ticked, which may be more than `ids` lists.",
          "minimum": 0.0,
          "title": "Count",
          "type": "integer"
        },
        "excluded_ids": {
          "items": {
            "pattern": "^[\\w-]{1,64}$",
            "type": "string"
          },
          "maxItems": 100,
          "title": "Excluded Ids",
          "type": "array"
        },
        "ids": {
          "items": {
            "pattern": "^[\\w-]{1,64}$",
            "type": "string"
          },
          "maxItems": 100,
          "title": "Ids",
          "type": "array"
        },
        "of": {
          "description": "What the ids are of: \"row\", \"contact\", \"thread\".",
          "pattern": "^[a-z][a-z_ ]{0,63}$",
          "title": "Of",
          "type": "string"
        }
      },
      "required": [
        "of"
      ],
      "title": "OnScreenSelectionSchema",
      "type": "object"
    },
    "OnScreenSortSchema": {
      "additionalProperties": false,
      "description": "One level of the order a page shows its rows in.",
      "properties": {
        "direction": {
          "enum": [
            "asc",
            "desc"
          ],
          "title": "Direction",
          "type": "string"
        },
        "field": {
          "maxLength": 255,
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "field",
        "direction"
      ],
      "title": "OnScreenSortSchema",
      "type": "object"
    },
    "OnScreenViewSchema": {
      "additionalProperties": false,
      "description": "The saved view or tab a page shows.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "pattern": "^[\\w-]{1,64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "unsaved_changes": {
          "default": false,
          "description": "Whether the person changed the view without saving it.",
          "title": "Unsaved Changes",
          "type": "boolean"
        }
      },
      "title": "OnScreenViewSchema",
      "type": "object"
    },
    "PageContextSchema-Input": {
      "description": "What the person had open when they sent the message.\n\nSo \"this table\" resolves without them naming it. Sent by the dashboard,\noptional everywhere: a message from anywhere else simply carries none.\nKept with the message and read back with it, so the transcript can say\nwhere each message was sent from.",
      "properties": {
        "entity_id": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The id of that thing; an account's is its key (`acme.com`).",
          "title": "Entity Id"
        },
        "entity_name": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What it is called, as the page showed it, so the assistant can say it back. Cut to 255 characters rather than refused.",
          "title": "Entity Name"
        },
        "entity_type": {
          "anyOf": [
            {
              "maxLength": 64,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What the page is about: `table`, `sequence`, `agent`, `integration`, `inbox thread`, `sender`, `mailbox` or `account`. Null on a page about no one thing.",
          "title": "Entity Type"
        },
        "on_screen": {
          "anyOf": [
            {
              "$ref": "#/$defs/OnScreenSchema"
            },
            {
              "type": "null"
            }
          ],
          "description": "What the page shows beyond its address: its filters, view, search, order, dates, what is ticked or open, and the words in an unsaved box."
        },
        "page_name": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The page or tab they have open, in the screen's own words: a sequence's \"Audience\" tab, an agent's \"Train\", or a page about no one thing, such as \"Tasks\".",
          "title": "Page Name"
        },
        "route": {
          "anyOf": [
            {
              "maxLength": 500,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The path they have open, e.g. `/tables/1234`.",
          "title": "Route"
        },
        "selected_step_id": {
          "anyOf": [
            {
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The selected sequence builder step; resolve it against the sequence before editing.",
          "title": "Selected Step Id"
        },
        "selected_step_label": {
          "anyOf": [
            {
              "maxLength": 255,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The selected step as the Builder numbers and names it, e.g. \"Step 1 · Opener\". The id is what to edit by; this is how the person sees it.",
          "title": "Selected Step Label"
        }
      },
      "title": "PageContextSchema",
      "type": "object"
    }
  }
}