Create Shareable Links to Query via API

Hi,
I would like to generate a shareable link to a Query under Discover in Kibana via an API. Like filters/index/timeframe should be set via an automation. Is there any way to do that? In the documentation I can only find it via the Share button in the UI.
Thanks in advance.

Hi @seboz123 , welcome to our community.

Have you tried Create saved query API | Kibana Guide [8.15] | Elastic ?

Regards,
Alex