Use the postal mail engagement API to log any postal mail you’ve sent to or received from contacts or companies on their CRM records.
POST
request to /crm/v3/objects/postal_mail
.
In the request body, add postal mail details in a properties object. You can also add an associations object to associate your new postal mail with an existing record (e.g., contacts, companies).
Field | Description |
---|---|
hs_timestamp | The date that the postal mail was sent or received. |
hs_postal_mail_body | The body text of the postal mail engagement. |
hubspot_owner_id | The ID of the user that created the postal mail engagement. |
hs_attachment_ids | The IDs of any attachments to the postal mail engagement. Multiple attachment IDs are separated by a semi-colon. |
Parameter | Description |
---|---|
to | The record you want to associate with the postal mail, specified by its unique id value. |
types | The type of the association between the postal mail and the record. Include the associationCategory and associationTypeId . Default association type IDs are listed here, or you can retrieve the value for custom association types (i.e. labels) via the associations API. |
GET
request to /crm/v3/objects/postal_mail/{postalMail}
. You can include the following parameters in the request:
Parameter | Description |
---|---|
properties | A comma separated list of the properties to be returned. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a postal mail doesn’t have a value, it will be returned as null . |
associations | A comma separated list of object types to retrieve associated IDs for. Any specified associations that don’t exist will not be returned in the response. Learn more about the associations API. |
GET
request to crm/v3/objects/postal_mail
. You can include the following parameters in the request:
Parameter | Description |
---|---|
limit | The maximum number of results to display per page. |
properties | A comma separated list of the properties to be returned. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a postal mail doesn’t have a value, it will be returned as null . |
PATCH
request to /crm/v3/objects/postal_mail/{postalMail}
.
In the request body, include the properties that you want to update. For example, to update the body of the engagement, your request body might look similar to the following:
PUT
request to /crm/v3/objects/postal_mail/{postalMail}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
.
Parameter | Description |
---|---|
postalMail | The unique ID of the postal mail engagement. |
toObjectType | The type of object that you want to associate the postal mail with (e.g., contact or company ). |
toObjectId | The ID of the record that you want to associate the postal mail with. |
associationTypeId | A unique identifier to indicate the association type between the postal mail and the other object. The ID can be represented numerically or in snake case (e.g., POSTAL_MAIL_TO_CONTACT ). You can retrieve the value through the associations API. |
https://api.hubspot.com/crm/v3/objects/postal_mail/25727582880/associations/contact/104901/POSTAL_MAIL_TO_CONTACT
DELETE
request to:
/crm/v3/objects/postal_mail/{postalMail}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
id
in the hs_pinned_engagement_id
field when creating or updating a record via the object APIs. Learn more about using the companies,contacts, deals, tickets, and custom objects APIs.
DELETE
request to /crm/v3/objects/postal_mail/{postalMail}
.
Learn more about deleting postal mail engagements in the reference documentation.