Adding users to a segment via api

can i add users to a segment through an api instead of doing it manually?

We do have an API to add users.
Can we add segments via. API @Kanchepalli_Harsha_V ?

As our segments are more dynamic, we do not have an option to add users manually to a segment unless you are importing users.