Skip to content

SDK method

tools.enrollInJourney

Enroll contact in journey. Convenience alias for enroll_in_journey, forwarding to tinbox.api.journeys.trigger.mutate.

Signature

ts
enrollInJourney(input: Parameters<TinboxTools["enrollInJourney"]>[0]): ReturnType<TinboxTools["enrollInJourney"]>

Parameters

NameTypeRequiredDescription
journeyIdstringyesThe journey to enroll the contact into.
contactIdstringnoThe contact id (provide this or `email`).
emailstringnoThe contact's email (resolved to a contact).

Returns

ReturnType<TinboxTools["enrollInJourney"]>

Example

ts
await tinbox.tools.enrollInJourney({
  "journeyId": "<journeyId>"
});