Adds a participant to an email task.
The SID of the email task to add the participant to.
The email address of the participant to add.
The level of the participant to add, which should be either ParticipantLevel.To or ParticipantLevel.CC.
Additional options for the participant, containing the 'name' field which is the friendly name for the participant to be added.
A promise that resolves when the participant is successfully added.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { AddEmailParticipant, ParticipantLevel } from "@twilio/flex-sdk/actions/Conversation";async function addEmailParticipant() { const client = await createClient("SDK_TOKEN"); const addEmailParticipant = new AddEmailParticipant("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "test.user@gmail.com", ParticipantLevel.To, { name: "Test User" }); await client.execute(addEmailParticipant);} Copy
import { createClient } from "@twilio/flex-sdk";import { AddEmailParticipant, ParticipantLevel } from "@twilio/flex-sdk/actions/Conversation";async function addEmailParticipant() { const client = await createClient("SDK_TOKEN"); const addEmailParticipant = new AddEmailParticipant("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "test.user@gmail.com", ParticipantLevel.To, { name: "Test User" }); await client.execute(addEmailParticipant);}
Optional
Adds a participant to an email task.
Param: taskSid
The SID of the email task to add the participant to.
Param: email
The email address of the participant to add.
Param: level
The level of the participant to add, which should be either ParticipantLevel.To or ParticipantLevel.CC.
Param: options
Additional options for the participant, containing the 'name' field which is the friendly name for the participant to be added.
Returns
A promise that resolves when the participant is successfully added.
Throws
FlexSdkError with the following error code(s):
Example