Get the custom message end points from the account and its ancestor. If the 'restrictToEnterprise' is set to true, the ancestor hierarchy stops at the first ancestor account that is an enterprise account.

Language
Credentials
Click Try It! to start a request and see the response here!