APIs & Integrations

Jwil
Participante

Creating events for custom objects

Hi, we are using Custom objects for out Trials. Now I want to create an event for that object using Custom Behavioral Events through the API Endpoint (https://developers.hubspot.com/docs/api/analytics/events)

 

When I try that I get 204 but nothing is found under the object or in the events.

 

REQUEST

/* https://www.npmjs.com/package/@hubspot/api-client */

var request = require("request");

var options = {

method: 'POST',

url: 'https://api.hubapi.com/events/v3/send',

qs: {hapikey: 'REMOVED'},

headers: {accept: 'application/json', 'content-type': 'application/json'},

body: {

email: 'wilmenius@hotmail.com',

eventName: 'pe2714638_rp_trial_created',

properties: {'11': '', hs_status: '1', additionalProp3: ''},

occurredAt: '2021-06-21T12:51:00.000Z',

objectId: '196664842'

},

json: true

};

request(options, function (error, response, body) {

if (error) throw new Error(error);

console.log(body);

});

RESPONSE

HTTP 204

 

Thanks,

Johan

0 Me gusta
1 Respuesta 1
webdew
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

Creating events for custom objects

Hi @Jwil ,

Refer this artcle here:

https://developers.hubspot.com/docs/api/crm/timeline

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Me gusta