Skip to main content

Participants API

Please remember that any time you see externalID in the documentation, it refers to the the externalID we have sent your way via the defined webhook when creating a user. If the user has agreed to share their data with you, then we recommend that you store this ID internally as we do not keep any PHI associations between your system and ours for privacy reasons.

List Participant Information

GET /participants/{externalID}

Retrieve detailed information about a specific participant.

Headers

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

URL Parameters

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

Example Call

await fetch(
"https://api.okaya.me/participants/ok_participant1/sessions",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
).then((response) => response.json());

Example Response

200

{
"externalID": "ok_participant1",
"userGroups": [
{
"externalID": "ok_participant1",
"groupID": 123456,
"joinDate": "2024-01-01T00:00:00Z",
"privacyLevel": 0
}
]
}

400

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

401: Unauthorized

List All Sessions for a Participant

GET /participants/{externalID}/sessions

Lists all sessions associated with a specific participant.

Headers

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

URL Parameters

  • externalID: The external identifier for the participant.

Example Call

await fetch(
"https://api.okaya.me/participants/ok_participant1/sessions",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
).then((response) => response.json());

Example Response

200

[
"session1",
"session2",
"session3"
]

400

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

401: Unauthorized