Retrieves the definition of a modal surfaced by a `MODAL_ACTION` on an assistant message, so that your application can render it natively.
Every path parameter comes from that message. An entry in its `actions` array whose `type` is `MODAL_ACTION` carries the `modal_id` as `modal_action.modal_id`, and the message itself supplies `conversation_id`, `response_id`, and `message_id`. Assistant messages arrive from the list-messages endpoints, the get-response endpoint, and the `RESPONSE_OUTPUT_DELTA` and `RESPONSE_COMPLETED` streaming events.
Conditional field rules are evaluated server-side, so every field arrives with its initial `visible`, `required`, and `read_only` state already resolved. Render the fields in the order they are returned. Fields whose value can change another field's state are flagged with `triggers_refresh`; call the refresh endpoint after one of those values changes.
Keep the `options` list of every choice field in your own state. It is returned here and is not repeated on the refresh response.
Response
Modal retrieved successfully
modal_idstring
Opaque modal identifier, echoed from the MODAL_ACTION that surfaced this modal.
titlestring
Modal title to display.
fieldslist of objects
Fields in display order. Render them in the order returned.