Learn about CRM cards built for legacy public apps.
crm.objects.contacts.read
and crm.objects.contacts.write
scopes. If you later need to remove CRM object scopes from your app, you’ll first need to delete all existing cards for those object types.
GET
or PATCH
request to /crm/v3/extensions/cards-dev/{appId}/{cardId}
.
To view or update a legacy card’s configuration in HubSpot:
targetUrl
field.objectTypes
array.GET
request as follows.
Parameter | Type | Description |
---|---|---|
userId | Default | The ID of the HubSpot user that loaded the CRM record. |
userEmail | Default | The email address of the user that loaded the CRM record. |
associatedObjectId | Default | The ID of the CRM record that loaded. |
associatedObjectType | Default | The type of CRM record that loaded (e.g., contact, company, deal). |
portalId | Default | The ID of the HubSpot account where the CRM record loaded. |
firstname | Custom | The contact’s first name, as specified in the Properties sent from HubSpot dropdown menu (in-app) and propertiesToSend array (API). |
email | Custom | The contact’s email address, as specified in the Properties sent from HubSpot dropdown menu (in-app) and propertiesToSend array (API). |
lastname | Custom | The contact’s last name, as specified in the Properties sent from HubSpot dropdown menu (in-app) and propertiesToSend array (API). |
Prop | Type | Description |
---|---|---|
results | Array | An array of up to five valid card properties. If more card properties are available for a specific CRM object, your app can link to them. |
objectId | Number | A unique ID for this object. |
title | String | The title of this object. |
link | String | The URL that the user can follow to get more details about the object. If no objects have a link, you should provide a value of null . |
created | String | A custom property as defined in the card’s settings that denotes the date of the object’s creation. |
priority | String | A custom property as defined in the card’s settings that denotes external ticket’s priority level. |
actions | Array | A list of available actions a user can take. |
properties | Properties | A list of custom properties that aren’t defined in the card settings. You can use this list to display a specific object’s unique properties. These properties will be shown in the order they’re provided, but after the properties defined in the card settings. |
settingsAction | Object | An iframe action that enables users to update the app’s settings. |
primaryAction | Object | The primary action for a record type, typically a creation action. |
secondaryActions | Array | A list of other actions displayed on the card. |
X-HubSpot-Signature: <some base64 string>
To verify this signature:
<app secret>
+ <HTTP method>
+ <URL>
+ <request body> (if present)
.results
. In addition to the properties configured on this tab, the integration can also include its own custom properties without needing them to be defined in the card’s settings.
For example, in the response below, created
and priority
are both defined in the Card properties tab, while the properties
array sends its own property definitions and values. These object-specific properties must be defined per object.
dataType
field for each property can be set to one of: CURRENCY
, DATE
, DATETIME
, EMAIL
, LINK
, NUMERIC
, STATUS
, STRING
. Depending on the property type, the integration may need to provide additional fields. Below, learn more about each property type.
CURRENCY
properties must include a currencyCode
, which needs to be a valid ISO 4217 code. This will ensure the user sees the correct currency symbol and number formatting.
DATE
properties should be in the format yyyy-mm-dd
. These properties will be displayed in a format appropriate to the user’s locale. If you need to include a timestamp, you should instead use a DATETIME
property.
DATETIME
properties indicate a specific time and must be provided as milliseconds since epoch. These properties will be displayed in a format appropriate to the user’s locale.
EMAIL
properties are for values that contain an email address. These properties will be displayed as mailto links.
LINK
properties display hyperlinks and open in a new window. You can specify a linkLabel
, otherwise the URL itself will be displayed.
NUMERIC
properties display numbers.
STATUS
properties display as colored indicators. To define a status property, the integration must provide an optionType
that describes the possible statuses. Statuses include:
DEFAULT
: GreySUCCESS
: GreenWARNING
: YellowDANGER
: RedINFO
: BlueSTRING
properties display text.
X-HubSpot-Signature
header for verifying the request. Iframe action requests will not include a request signature. See request signatures for more information.
Action URLs are accessed in the uri
field in an action. Similar to the data fetch request, action hooks will include a default set of query parameters. You can include other query parameters by including an associatedObjectProperties
field in the action.
The response will vary depending on type of action. Below, learn more about action types.
IFRAME
actions will open a modal containing an iframe pointing at the provided URL. No request signature is sent when the iframe is opened from the CRM UI. This is because the iframe URL is returned in the original data fetch request, and no additional proxy requests are needed.
window.postMessage
to signal to the CRM that the user is done. The following messages are accepted:
{"action": "DONE"}
: the user has successfully competed the action.{"action": "CANCEL"}
: the user has canceled the action.ACTION_HOOK
actions send a server-side request to the integrator. The only UI a users sees for this action is a success or error message. This type of action is useful for simple operations that require no further input from the user. An X-HubSpot-Signature
header will be included in the request for verification. Learn more about request signatures.
httpMethod
can be set to GET
, POST
, PUT
, DELETE
, or PATCH
. If using GET
or DELETE
, the associatedObjectProperties
values will be appended to the request URL as query parameters. Otherwise, the properties will be sent in the request body.
CONFIRMATION_ACTION_HOOK
actions behave the same as ACTION_HOOK
actions, except that a confirmation dialog is shown to the user before running the server-side request. An X-HubSpot-Signature
header will be included in the request for verification. Learn more about request signatures.
httpMethod
can be set to GET
, POST
, PUT
, DELETE
, or PATCH
. If using GET
or DELETE
, the associatedObjectProperties
values will be appended to the request URL as query parameters. Otherwise, the properties will be sent in the request body.
DELETE
request to /crm/v3/extensions/cards-dev/{appId}/{cardId}
.
You can also delete a legacy CRM card from the app’s settings: