Get element schema
get_element_schemaReturn the schema for an element type's type_data, as TypeScript declarations. Call this before add_elements / update_elements when you don't already know the field shape for the element_type you're placing.
Pass element_type='group' for the GROUP surface instead — what a group is, how its pivot works, and the nine properties it can animate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'add' returns required + optional fields; 'update' returns all-optional. | add |
| fields | No | Return only these fields, with their prose — text is 15KB whole, ~300 bytes for two. Omit while learning the type: only the full schema carries the keyframable list and the keyframe rules. | |
| format | No | Defaults to 'declarations' — TypeScript-style, which is the better READ. Inside run_script it defaults to 'json' instead, because a script indexes into the structure and the declaration text would arrive newline-escaped. Set it explicitly to override either default. | |
| element_type | Yes | One of: text, callout, rectangle, arrow, blur, spotlight, zoom, image, video, animation, group |