...
When doing multi-tenant integrations, three concept concepts need to be considered and properly scoped: Configuration, URLs Routes and RecordsModels.
Configuration scoping
Which configuration parameters should be used based on the context (url, field stored in database)? Maestrano.com has its own set of API endpoints but other enterprise tenants will have other different ones.
URL Route scoping
One way of understanding the context is to properly scope urls. E.g.: Webhooks coming from Maestrano should hit a url like "/maestrano/some-webhook" while webhooks coming from another tenant should look like "/sometenant/some-webhook". In a more general manner, URLs related to Maestrano integration should be parameterized using a tenant key: "/:tenant_key/some-webhook"
Record Model scoping
When storing records related to Maestrano and/or one of Maestrano enterprise customers, then your application should be able to record to which tenant it is related to. This is usually done by storing a tenant key on the record or in an identity lookup table.
...