APIs & Integrations

PHuk
Member

Retrieve the form data using inbox channel properties

Hi,

I have a problem getting the properties of a form. I don't have its ID, but I have an inbox ID that this form is associated with. Using conversations api, I can get inbox channels - but there is no form ID returned. Below is the json:

 

{
"id": "588616046",
"channelId": "1003",
"name": "Default form (Apr 29, 2024 10:44:51 AM)",
"inboxId": "519672943",
"active": true,
"authorized": true,
"createdAt": "2024-04-29T08:45:16.172Z",
"archived": false
}
 
Is there a way to get the form data using this information? I could get all the forms and match the name, but that's not a preferable solution.
0 Upvotes
2 Replies 2
HMir
Member

Retrieve the form data using inbox channel properties


@PHuk wrote:

Hi,

I have a problem getting the properties of a form. I don't have its ID, but I have an inbox ID that this form is associated with. Using conversations api, I can get inbox channels - but there is no form ID returned. Below is the json:

 

{
"id": "588616046",
"channelId": "1003",
"name": "Default form (Apr 29, 2024 10:44:51 AM)",
"inboxId": "519672943",
"active": true,
"authorized": true,
"createdAt": "2024-04-29T08:45:16.172Z",
"archived": false
}
 
Is there a way to get the form data using this information? I could get all the forms and match the name, but that's not a preferable solution.

To retrieve the form data using the inbox ID without having the form ID, you need to understand the relationship between forms and inboxes within the Conversations API. Since the API response does not directly provide the form ID when querying inbox channels, one approach is to list all forms and then filter the results by matching the inbox ID and form name. This method, although not ideal, ensures you can find the relevant form associated with the given inbox. By looping through the list of forms and checking the inbox ID and other attributes such as the form name, you can accurately identify and retrieve the necessary form data.

 
0 Upvotes
PHuk
Member

Retrieve the form data using inbox channel properties

Thank you for your answer, but as I wrote in the initial post - I'd like to know if there is a better way than looping through the list of forms and matching their names.

0 Upvotes