I don’t see a way to specify the app_id (which in turn specifies the workspace) when interacting with the Rest API. I have two apps: for both test and prod workspaces. Access token for both of them is the same.
I experienced the following: I tried to create a new data attribute by issuing a POST request to https://api.intercom.io/data_attributes supplying my access token (-H 'Authorization:Bearer ’ \ ) and it got created in the test workspace. I deleted the testApp hoping that this would leave nothing but the prodApp for the api to post to. But after that, I started getting unauthorized response on all routes. I ended up regenerating the token. This fixed my issue and now all the updates go to the prod workspace.
I want to be able to interact with both workspaces through the REST API independently. How do I do that?