Skip to main content

Email API

Send Email to Group

POST /interact/groups/{groupID}/email

Send an email to all participants in a group. Keep in mind only participants that have the relevant email preference enabled will receive this email.

Currently supported email types are checkinReminder, which reminds a participant to complete a check-in, and privacyRequest, which requests a privacy preference review.

Headers

{ "x-api-key": "YOUR_API_KEY" }

URL Parameters

  • groupID (required): The group ID of the group you want to email.

Body

{ "emailType": "checkinReminder" | "privacyRequest" }

Example Call

await fetch(
"https://api.okaya.me/interact/groups/1710748366424/email",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
emailType: "Email Type",
}),
}
).then((response) => response.json());

Example Response

200

{ "message": "success" }

400

{ "error": "You are missing the path parameter groupID" | "groupID must be a number" }

401: Unauthorized

Send Email to Participant

POST /interact/participants/{externalID}/email

Send an email to a specific participant. Keep in mind only participants that have the relevant email preference enabled will receive this email.

Currently supported email types are checkinReminder, which reminds a participant to complete a check-in, and privacyRequest, which requests a privacy preference review.

Headers

{ "x-api-key": "YOUR_API_KEY" }

URL Parameters

  • externalID (required): The external identifier for the participant.

Body

{ "emailType": "checkinReminder" | "privacyRequest" }

Example Call

await fetch(
"https://api.okaya.me/interact/participants/ok_participant1/email",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
emailType: "Email Type",
}),
}
).then((response) => response.json());

Example Response

200

{ "message": "success" }

400

{ "error": "You are missing the path parameter externalID" }

401: Unauthorized