FlexOrgs do have API support and all of the functionality within the UI for FlexOrgs is also available via API.
For more information on FlexOrgs API details, see: https://apidocs.cloudhealthtech.com/#organization_introduction-to-organization-api