There has been JavaScript API for AutoCAD (since AutoCAD 2015?), and it is now in its version 4. You can find its documentation here:
https://help.autodesk.com/view/OARX/2025/ENU/?guid=adsk_jsdev_autocad_javascript_api_about
However, when Autodesk released the JavaScrcipt API then, it probably aimed at preparing for moving AutoCAD to the web. In reality, AutoCAD still remains as one of the most local resource demanding desktop app so far and will be in that way for years to come, its JavaScript API most ends up collecting dust in its corner and rarely any CAD application developers want to waste time to try it. Even with current Autodesk's effort to provide web version of AutoCAD, with latest web technologies, they probably would not use the JavaScript API.
IMO, the AutoCAD's JavaScript API is basically useless, so far.