Privacy API
Request a Privacy Level for a Group
POST /configure/groups/{groupID}/privacy
Sets the requested privacy level for a group. If your requested privacy level is higher than what the participant has set, they will receive a notice upon check-in asking them to review their privacy settings. Note that the user is not required to change their privacy level to what you request. You can view the current requested privacy level here.
Headers
{ "x-api-key": "YOUR_API_KEY" }
URL Parameters
groupID
(required): The group ID of the group you want to email.
Body
{ "requestedPrivacyLevel": ["mhci", "transcript"] }
Example Call
- JavaScript
- Python
- cURL
await fetch(
"https://api.okaya.me/configure/groups/1710748366424/privacy",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
requestedPrivacyLevel: [],
}),
}
).then((response) => response.json());
import requests
requests.post("https://api.okaya.me/configure/groups/1710748366424/privacy",
headers={
"x-api-key": "YOUR_API_KEY"
},
json={
"requestedPrivacyLevel": []
}
).json()
curl --location --request POST "https://api.okaya.me/configure/groups/1710748366424/privacy" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
"requestedPrivacyLevel": []
}'
Example Response
200
{ "message": "success" }
400
- Invalid 'groupID'
- Group not found
- Invalid group
- Invalid 'requestedPrivacyLevel'
{ "error": "You are missing the path parameter groupID" | "groupID must be a number" }
{ "error": "Group not found" }
{ "error": "Group doesn't exist in associated groups" }
{ "error": "You are missing the body parameter requestedPrivacyLevel" | "Invalid requestedPrivacyLevel. Should be an array with elements in ['mhci', 'groupPerecntiles', 'userPercentiles', 'transcript', 'features']." }
401: Unauthorized
Request a Privacy Level for a Participant
POST /configure/participants/{externalID}/privacy
Sets the requested privacy level for a participant. If your requested privacy level is higher than what the participant has set, they will receive a notice upon check-in asking them to review their privacy settings. Note that the user is not required to change their privacy level to what you request. You can view the current requested privacy level here.
Headers
{ "x-api-key": "YOUR_API_KEY" }
URL Parameters
externalID
(required): The external identifier for the participant.
Body
{ "requestedPrivacyLevel": ["mhci", "transcript"] }
Example Call
- JavaScript
- Python
- cURL
await fetch(
"https://api.okaya.me/configure/participants/ok_participant1/privacy",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
requestedPrivacyLevel: [],
}),
}
).then((response) => response.json());
import requests
requests.post("https://api.okaya.me/configure/participants/ok_participant1/privacy",
headers={
"x-api-key": "YOUR_API_KEY"
},
json={
"requestedPrivacyLevel": []
}
).json()
curl --location --request POST "https://api.okaya.me/configure/participants/ok_participant1/privacy" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
"requestedPrivacyLevel": []
}'
Example Response
200
{ "message": "success" }
400
- Invalid 'externalID'
- Participant not found
- Invalid 'requestedPrivacyLevel'
{ "error": "You are missing the path parameter externalID" }
{ "error": "Participant not found" }
{ "error": "You are missing the body parameter requestedPrivacyLevel" | "Invalid requestedPrivacyLevel. Should be an array with elements in ['mhci', 'groupPerecntiles', 'userPercentiles', 'transcript', 'features']." }