Learn how to create a settings page for your app.
accountID
returned to HubSpot is what’s passed on to the control and feature card components so you’ll know which account HubSpot is interacting with.X-HubSpot-Signature
header to verify that the request came from HubSpot. Read more about request signatures for details.
GET
or POST
request from HubSpot. This will be called to populate a list of user accounts on the customer’s app settings page.GET
as the HTTP method for your endpoint, the fields will be included as query params. For example:POST
as the HTTP method, the fields will be included in the request body as a JSON object. For example:accountId
, accountName
of the user, along with an optional accountLogoUrl
.X-HubSpot-Signature
header to verify that the request came from HubSpot. Read more about request signatures for details.
HubSpot will attempt to parse responses to actions as JSON and look for a message property. This message will be displayed to the user on either success or failure. Response status code of 2xx will show a success message and status codes of 4xx or 5xx will show an error message.
An example response may look similar to the following:
PUT
, POST
or DELETE
). While no data is returned, HubSpot will communicate the resulting success, failure, or timeout status of the action to the customer. You should use all parameters HubSpot sends to determine which account you are making changes for.
To add a button control type::
PUT
, POST
or DELETE
request from HubSpot. HubSpot will provide the associated identifying fields for the customer based on the HTTP method you select when configuring your button.GET
or POST
).
GET
as the HTTP method for your endpoint, the fields will be included as query parameters. For example:
POST
as the HTTP method, the fields will be included in the request body as a JSON object. For example:iframeURL
:TOGGLE_FETCH
URL. When a user clicks the toggle, HubSpot calls the TOGGLE_UPDATE
URL to send the toggle’s new state. Other identifiers such as accountId
and portalId
are also passed – this allows you to identify the user triggering the toggle.
To add a toggle:
GET
or POST
request from HubSpot, which will be called to fetch the existing toggle state for a customer when they visit the settings page for your app.GET
as the HTTP method for your endpoint, the fields will be included as query parameters. For example:POST
as the HTTP method, the fields will be included in the request body as a JSON object. For example:POST
or PUT
request from HubSpot, which will be called when the toggle is turned on or off.DROPDOWN_FETCH
URL. Your API may also return a selectedOption
field to display which option the user has selected, as well as a placeholder field signifying what text to display when no option is selected. By passing the accountId
, portalId
, and other identifiers, you can identify which user triggered the control.
When a user clicks on an option in the dropdown menu, HubSpot calls the DROPDOWN_UPDATE
URL to send the same identifiers along with the selected option.
To add a dropdown menu:
GET
or POST
request from HubSpot, which will be called to fetch the list of dropdown options from the app settings page.
GET
as the HTTP method for your endpoint, the fields will be included as query parameters. For example:
POST
as the HTTP method, the fields will be included in the request body as a JSON object. For example:POST
or PUT
request from HubSpot. The fields will be included in the body as a JSON object: