इवेंट
इस समूह का हर ऑपरेशन: वह क्या लेता है, क्या लौटाता है और किन त्रुटियों के साथ जवाब दे सकता है।
ऑपरेशन
Things your contacts did, sent by your own code: an order placed, a trial started, a plan changed. An event is stored against the contact for 90 days. It starts every live automation whose trigger names it, ends a wait step that was waiting for it, and can be read by a branch.
Send one with POST /events or up to 100 with POST /events/batch. Both take an Idempotency-Key header, so a retry never records an event twice. A key or an app may send 600 events a minute. Sending needs contacts:write and reading the events of a contact needs contacts:read.
POST/events
Send a contact event
Records that something happened to one contact, named by email or contactId. Every live automation whose trigger is this event name, and whose filters match properties, takes the contact in, and any wait step holding out for the name moves on. enrolled and resumed say what it set off.
An address nobody has saved is a 404 unless createContact is true, which adds it to the contacts first. An event sent with a test key is stored with mode test and starts nothing. A key or an app may send 600 events a minute.
Requires the contacts:write scope.
हेडर
Idempotency-KeystringMakes a retry safe. The same key with the same event returns the stored event with
replayedtrue and starts nothing again. The same key with a different event is a 422idempotency_key_reuse.अधिकतम 255 वर्ण
अनुरोध बॉडी
namestringआवश्यकWhat happened, such as
order.placed: 1 to 100 letters, digits, dots, colons, dashes and underscores, starting with a letter or a digit. Names are matched exactly, case included.1 से 100 वर्णemailstringThe contact the event is about, by email address. Send this or
contactId.अधिकतम 320 वर्णफ़ॉर्मैटemailcontactIdstringThe contact the event is about, by id. Send this or
email.1 से 64 वर्णpropertiesRecord<string, any>Anything worth keeping about the event, as a JSON object of at most 50 keys and 4 KB. An event trigger can filter on these, and steps can put them in an email or a contact field.
occurredAtstringWhen it happened, as an ISO 8601 instant. Left out, it is now. It cannot be in the future or more than 90 days ago.
फ़ॉर्मैटdate-timecreateContactbooleanAdd the address to the contacts when nobody has it yet. It needs
email. Left out or false, an unknown address is a 404contact_not_found.contactNamestringThe name to give a contact that
createContactadds.अधिकतम 200 वर्ण
लौटाता है
A replay: the event this Idempotency-Key stored before.
Recorded.
त्रुटियाँ
- 404
contact_not_foundwhen nobody has that address or id andcreateContactis not true.- 422
invalid_eventwhen the name, the properties oroccurredAtbreak a rule or no contact is named,invalid_parameterorunknown_parameterfor a body of the wrong shape, oridempotency_key_reusewhen the key was already used for a different event.- 429
event_rate_limited: more events in a minute than the key or app may send.
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403500त्रुटि सूची
इनमें भी उपलब्ध
- TypeScript
events.send()- Python
events.send()- Ruby
events.send- PHP
events->send- Go
Events.Send- Java
events().send- C#
Events.SendAsync- CLI
openemail events send
POST/events/batch
Send contact events in a batch
Records up to 100 events in one call, each handled exactly as POST /events handles one, in order. One event failing does not stop the rest: accepted holds the ones that were stored and failed the ones that were not, each with the index it had in the request. A body of the wrong shape is refused whole. The batch counts as that many events toward the 600 a minute a key or an app may send.
Requires the contacts:write scope.
हेडर
Idempotency-KeystringMakes a retry of the whole batch safe. Each event is remembered under the key and its position, so resend the same events in the same order.
अधिकतम 255 वर्ण
अनुरोध बॉडी
eventsobject[]आवश्यकThe events, 1 to 100 of them, each in the shape a single event takes.
1 से 100 आइटमnamestringआवश्यकWhat happened, such as
order.placed: 1 to 100 letters, digits, dots, colons, dashes and underscores, starting with a letter or a digit. Names are matched exactly, case included.1 से 100 वर्णemailstringThe contact the event is about, by email address. Send this or
contactId.अधिकतम 320 वर्णफ़ॉर्मैटemailcontactIdstringThe contact the event is about, by id. Send this or
email.1 से 64 वर्णpropertiesRecord<string, any>Anything worth keeping about the event, as a JSON object of at most 50 keys and 4 KB. An event trigger can filter on these, and steps can put them in an email or a contact field.
occurredAtstringWhen it happened, as an ISO 8601 instant. Left out, it is now. It cannot be in the future or more than 90 days ago.
फ़ॉर्मैटdate-timecreateContactbooleanAdd the address to the contacts when nobody has it yet. It needs
email. Left out or false, an unknown address is a 404contact_not_found.contactNamestringThe name to give a contact that
createContactadds.अधिकतम 200 वर्ण
लौटाता है
What was stored and what was not.
त्रुटियाँ
- 422
invalid_parameterorunknown_parameterfor a body of the wrong shape, withparamnaming the event and the field, such asevents.3.name.- 429
event_rate_limited: the batch would pass the events a minute the key or app may send. Nothing was stored.
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404500त्रुटि सूची
इनमें भी उपलब्ध
GET/events/names
List the event names in use
The distinct names of the events the workspace holds, in byte order, at most 100. It is what the app suggests when somebody picks the event that starts an automation. Events are kept for 90 days, so a name nothing has sent in that time is gone.
Requires the automations:read scope.
लौटाता है
The names.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/contacts/{email}/events
List the events of a contact
The events recorded for one contact in the last 90 days, the most recent first by when they happened. An app a member connected reads only the contacts that member added.
Requires the contacts:read scope.
पाथ पैरामीटर
emailstringआवश्यकThe contact, by email address, compared without case. The
contactIdan event or an enrollment carries works here too.
क्वेरी पैरामीटर
namestringOnly events with exactly this name.
1 से 100 वर्णlimitintegerRows per page, 1 to 200.
कम से कम 1अधिकतम 200डिफ़ॉल्ट50cursorstringThe id of the last event on the previous page. Keyset, not offset: pass the previous page's
nextCursor. One that names nothing in this list is a 400invalid_cursor.
लौटाता है
A page of events.
त्रुटियाँ
- 404
contact_not_foundwhen nobody you can reach has that address or id.
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403422500त्रुटि सूची
इनमें भी उपलब्ध
- TypeScript
contacts.listEvents()contacts.listAllEvents()contacts.iterateEvents()- Python
contacts.list_events()contacts.list_all_events()contacts.iterate_events()- Ruby
contacts.list_eventscontacts.list_all_eventscontacts.iterate_events- PHP
contacts->listEventscontacts->listAllEventscontacts->iterateEvents- Go
Contacts.ListEventsContacts.ListAllEventsContacts.IterateEvents- Java
contacts().listEventscontacts().listAllEventscontacts().iterateEvents- C#
Contacts.ListEventsAsyncContacts.ListAllEventsAsyncContacts.IterateEventsAsync- CLI
openemail contacts list-events- MCP
listContactEvents
ऑब्जेक्ट
ContactEventobject
objectstringआवश्यक- इनमें से एक
"contact_event" idstringआवश्यकThe id of the event.
contactIdstringआवश्यकThe id of the contact it is about.
emailstringआवश्यकThe address of that contact.
फ़ॉर्मैटemailnamestringआवश्यकWhat happened, as it was sent.
propertiesobjectआवश्यकThe properties the event was sent with. Empty when it had none.
occurredAtstringआवश्यकWhen it happened.
फ़ॉर्मैटdate-timemodestringआवश्यकtestwhen a test key sent it. A test event is stored and starts or resumes nothing.इनमें से एक"live""test"createdAtstringआवश्यकWhen OpenEmail received it.
फ़ॉर्मैटdate-time
ContactEventBatchobject
objectstringआवश्यक- इनमें से एक
"contact_event_batch" acceptedobject[]आवश्यकThe events that were stored, in the order they were sent.
objectstringआवश्यक- इनमें से एक
"contact_event" idstringआवश्यकThe id of the event.
contactIdstringआवश्यकThe id of the contact it is about.
emailstringआवश्यकThe address of that contact.
फ़ॉर्मैटemailnamestringआवश्यकWhat happened, as it was sent.
propertiesobjectआवश्यकThe properties the event was sent with. Empty when it had none.
occurredAtstringआवश्यकWhen it happened.
फ़ॉर्मैटdate-timemodestringआवश्यकtestwhen a test key sent it. A test event is stored and starts or resumes nothing.इनमें से एक"live""test"createdAtstringआवश्यकWhen OpenEmail received it.
फ़ॉर्मैटdate-timereplayedbooleanआवश्यकTrue when this
Idempotency-Keywas used before and the stored event is returned, with nothing started again.enrolledstring[]आवश्यकThe ids of the automations the event put the contact into.
resumedintegerआवश्यकHow many waits for this event it ended, across every automation the contact is in.
कम से कम 0indexintegerआवश्यकWhere the event sat in the request, from 0.
कम से कम 0
failedobject[]आवश्यकThe events that were not stored.
indexintegerआवश्यकWhere the event sat in the request, from 0.
कम से कम 0codestringआवश्यकWhy, as the single call would answer:
invalid_event,contact_not_foundoridempotency_key_reuse.messagestringआवश्यकThe same in a sentence.
ContactEventListobject
objectstring- इनमें से एक
"list" dataContactEvent[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringThe id of the last row on this page, or null on the last page.
null हो सकता है
ContactEventNameobject
objectstringआवश्यक- इनमें से एक
"contact_event_name" namestringआवश्यकAn event name the workspace holds events for.
ContactEventNameListobject
objectstring- इनमें से एक
"list"
ContactEventResultobject
objectstringआवश्यक- इनमें से एक
"contact_event" idstringआवश्यकThe id of the event.
contactIdstringआवश्यकThe id of the contact it is about.
emailstringआवश्यकThe address of that contact.
फ़ॉर्मैटemailnamestringआवश्यकWhat happened, as it was sent.
propertiesobjectआवश्यकThe properties the event was sent with. Empty when it had none.
occurredAtstringआवश्यकWhen it happened.
फ़ॉर्मैटdate-timemodestringआवश्यकtestwhen a test key sent it. A test event is stored and starts or resumes nothing.इनमें से एक"live""test"createdAtstringआवश्यकWhen OpenEmail received it.
फ़ॉर्मैटdate-timereplayedbooleanआवश्यकTrue when this
Idempotency-Keywas used before and the stored event is returned, with nothing started again.enrolledstring[]आवश्यकThe ids of the automations the event put the contact into.
resumedintegerआवश्यकHow many waits for this event it ended, across every automation the contact is in.
कम से कम 0