Skip to main content
POST
/
webhooks
/
v3
/
{appId}
/
subscriptions
Crear una suscripción a eventos
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"
}
Productos compatibles
Se requiere uno de los siguientes productos o productos de ediciones superiores.
Marketing HubMarketing HubPro
Sales HubSales HubPro
Service HubService HubPro
Content HubContent HubStarter

Authorizations

hapikey
string
query
required

Path Parameters

appId
integer
required

El ID de la aplicación.

Body

application/json

New webhook settings for an app.

eventType
enum<string>
required

Tipo de evento a escuchar. Puede ser create, delete, deletedForPrivacy o 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

El nombre interno de la propiedad que se monitoreará en busca de cambios. Solo se aplica cuando "eventType" es "propertyChange".

Example:

"email"

active
boolean

Determina si la suscripción está activa o pausada. Por opción predeterminada, es false.

Example:

true

Response

successful operation

Complete details for an event subscription.

createdAt
string<date-time>
required

Cuando se creó esta suscripción. Formateado como milisegundos desde la época Unix.

active
boolean
required

Determina si la suscripción está activa o pausada.

eventType
enum<string>
required

Tipo de evento a escuchar. Puede ser "create", "delete', "deletedForPrivacy" o "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

El ID único de la suscripción.

objectTypeId
string

El identificador del tipo de objeto asociado con la suscripción.

propertyName
string

El nombre interno de la propiedad que se monitoreará en busca de cambios. Solo se aplica cuando "eventType" es "propertyChange".

updatedAt
string<date-time>

Cuando se actualizó por última vez esta suscripción. Formateado como milisegundos desde la Unix epoch.

I