Thats really difficult to say without knowing much more about your application.
When using the baseline scan the whole site is in scope by default, so in theory you dont have to do anything.
But life is never that simple and you've clearly got a case where that doesnt work.
I always recommend that people start by using the ZAP desktop, even if you just want to use ZAP in automation.
It much easier to see whats going on and to try things out.
There will be limits to what you can do without a context file.
However the context file format is not that complicated so you could generate a context file dynamically with the required details.
Cheers,
Simon