Zum Hauptinhalt springen
POST
/
webhooks
/
v3
/
{appId}
/
subscriptions
Criar uma assinatura de evento
curl --request POST \
  --url https://api.hubapi.com/webhooks/v3/{appId}/subscriptions \
  --header 'Content-Type: application/json' \
  --data '{
  "active": true,
  "eventType": "contact.propertyChange",
  "propertyName": "email"
}'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "objectTypeId": "<string>",
  "propertyName": "<string>",
  "active": true,
  "eventType": "contact.propertyChange",
  "id": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}
Produtos suportados
Requer um dos seguintes produtos ou superior.
Marketing HubMarketing HubProfessional
Sales HubSales HubProfessional
Service HubService HubProfessional
Content HubContent HubStarter

Authorizations

hapikey
string
query
required

Path Parameters

appId
integer
required

O ID do aplicativo.

Body

application/json

New webhook settings for an app.

eventType
enum<string>
required

O tipo de evento a ser monitorado. Pode ser "create", "delete", "deletedForPrivacy" ou "propertyChange".

Available options:
contact.propertyChange,
company.propertyChange,
deal.propertyChange,
ticket.propertyChange,
product.propertyChange,
line_item.propertyChange,
contact.creation,
contact.deletion,
contact.privacyDeletion,
company.creation,
company.deletion,
deal.creation,
deal.deletion,
ticket.creation,
ticket.deletion,
product.creation,
product.deletion,
line_item.creation,
line_item.deletion,
conversation.creation,
conversation.deletion,
conversation.newMessage,
conversation.privacyDeletion,
conversation.propertyChange,
contact.merge,
company.merge,
deal.merge,
ticket.merge,
product.merge,
line_item.merge,
contact.restore,
company.restore,
deal.restore,
ticket.restore,
product.restore,
line_item.restore,
contact.associationChange,
company.associationChange,
deal.associationChange,
ticket.associationChange,
line_item.associationChange,
object.propertyChange,
object.creation,
object.deletion,
object.merge,
object.restore,
object.associationChange
Example:

"contact.propertyChange"

objectTypeId
string
propertyName
string

O nome interno da propriedade a ser monitorada para alterações. Somente se aplica quando "eventType" é "propertyChange".

Example:

"email"

active
boolean

Determina se a assinatura está ativa ou pausada. Assume o padrão falso.

Example:

true

Response

successful operation

Complete details for an event subscription.

createdAt
string<date-time>
required

Quando esta assinatura foi criada. Formatado como milissegundos a partir de era Unix.

active
boolean
required

Determina se a assinatura está ativa ou pausada.

eventType
enum<string>
required

O tipo de evento a ser monitorado. Pode ser "create", "delete", "deletedForPrivacy" ou "propertyChange".

Available options:
contact.propertyChange,
company.propertyChange,
deal.propertyChange,
ticket.propertyChange,
product.propertyChange,
line_item.propertyChange,
contact.creation,
contact.deletion,
contact.privacyDeletion,
company.creation,
company.deletion,
deal.creation,
deal.deletion,
ticket.creation,
ticket.deletion,
product.creation,
product.deletion,
line_item.creation,
line_item.deletion,
conversation.creation,
conversation.deletion,
conversation.newMessage,
conversation.privacyDeletion,
conversation.propertyChange,
contact.merge,
company.merge,
deal.merge,
ticket.merge,
product.merge,
line_item.merge,
contact.restore,
company.restore,
deal.restore,
ticket.restore,
product.restore,
line_item.restore,
contact.associationChange,
company.associationChange,
deal.associationChange,
ticket.associationChange,
line_item.associationChange,
object.propertyChange,
object.creation,
object.deletion,
object.merge,
object.restore,
object.associationChange
id
string
required

O ID exclusivo da assinatura.

objectTypeId
string

O identificador do tipo de objeto associado à assinatura.

propertyName
string

O nome interno da propriedade que está sendo monitorada quanto a alterações. Somente se aplica quando "eventType" é "propertyChange".

updatedAt
string<date-time>

Quando esta assinatura foi atualizada pela última vez. Formatado como milissegundos a partir de era Unix.

I