Users
List learners
Lists learners and pending invitations in the API key’s organization.
GET
https://dash.trainertwin.com/api/v1
/
users
List learners
curl --request GET \
--url https://dash.trainertwin.com/api/v1/users \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/users"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"users": [
{
"id": "user_123",
"memberId": "member_123",
"name": "Avery Patel",
"email": "avery@example.com",
"emailVerified": true,
"role": "member",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"invitations": [
{
"id": "invitation_123",
"email": "learner@example.com",
"status": "pending",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 124
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}Authorizations
Organization API key generated in Dashboard → account menu → Developer API (dash.trainertwin.com/developer).
Query Parameters
Maximum number of records to return.
Required range:
1 <= x <= 100Number of records to skip.
Required range:
x >= 0⌘I
List learners
curl --request GET \
--url https://dash.trainertwin.com/api/v1/users \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/users"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"users": [
{
"id": "user_123",
"memberId": "member_123",
"name": "Avery Patel",
"email": "avery@example.com",
"emailVerified": true,
"role": "member",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"invitations": [
{
"id": "invitation_123",
"email": "learner@example.com",
"status": "pending",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 124
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}