End point URL and custom code

Sorry may sound like a strange question, Since HA runs via browser, is it possible to run custom scripts on the same server? For example php scripts or is it locked down?

Also, is it possible to create like a custom endpoint let’s say to the unlock a door but require certain POST data etc?

HA is open source. Sky’s the limit.

HA api would allow that. I created a seperate custom website for my entry access and doorbell. JSON triggers automation in HA