If you want to look up the inboxes for a conversation, you can use the list conversation inboxes API endpoint. When receiving payloads for inbound message events, there should be an object listing the inboxes the message was received in.
As for how to determine the owner of the inbox, there are a couple of things you can look at.
Let's inspect an example payload;
{
"_results": [
{
"_links": {
"self": "https://cloud-content-consulting.api.frontapp.com/inboxes/inb_42olp",
"related": {
"channels": "https://cloud-content-consulting.api.frontapp.com/inboxes/inb_42olp/channels",
"conversations": "https://cloud-content-consulting.api.frontapp.com/inboxes/inb_42olp/conversations",
"teammates": "https://cloud-content-consulting.api.frontapp.com/inboxes/inb_42olp/teammates",
"owner": "https://cloud-content-consulting.api.frontapp.com/teams/tim_2agp9"
}
},
"id": "inb_42olp",
"name": "Customer Success",
"is_private": false,
"is_public": true,
"address": "a54724cfd3c60cc8",
"send_as": "a54724cfd3c60cc8",
"type": "custom",
"custom_fields": {}
}
],
...
}
There are three fields to pay specific attention to;
_links.related.owner - this gives us an API URL to fetch the owner. Note that the URL will either contain /teams/:team_id or /teammates/:teammate_id - you can use this to tell if the owner is a team or a teammate. is_private - this will be true when this is an individual inbox (i.e. the owner is a teammate) is_public - this will be true only for team inboxes where the inbox has been set as a public inbox.
I hope this is helpful - Please let me know if you have any further questions
--Jason