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
- JavaScript
- Python
- cURL
await fetch(
"https://api.okaya.me/participants/ok_participant1",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
).then((response) => response.json());
import requests
requests.get("https://api.okaya.me/participants/ok_participant1/sessions",
headers={
"x-api-key": "YOUR_API_KEY"
},
).json()
curl --location "https://api.okaya.me/participants/ok_participant1/sessions" \
--header "x-api-key: YOUR_API_KEY"
Example Response
200
{
"externalID": "ok_participant1",
"userGroups": [
{
"externalID": "ok_participant1",
"groupID": 123456,
"joinDate": "2024-01-01T00:00:00Z",
"privacyLevel": 0
}
]
}
400
- Invalid 'externalID'
- Participant not found
{ "error": "You are missing the path parameter externalID" }
{ "error": "Participant not found" }
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
- JavaScript
- Python
- cURL
await fetch(
"https://api.okaya.me/participants/ok_participant1/sessions",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
).then((response) => response.json());
import requests
requests.get("https://api.okaya.me/participants/ok_participant1/sessions",
headers={
"x-api-key": "YOUR_API_KEY"
},
).json()
curl --location "https://api.okaya.me/participants/ok_participant1/sessions" \
--header "x-api-key: YOUR_API_KEY"
Example Response
200
[
"session1",
"session2",
"session3"
]
400
- Invalid 'externalID'
- Participant not found
{ "error": "You are missing the path parameter externalID" }
{ "error": "Participant not found" }