curl --request GET \
--url https://api.sandbox.gravitypay.app/v1/students \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.gravitypay.app/v1/students"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.gravitypay.app/v1/students', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.gravitypay.app/v1/students",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.gravitypay.app/v1/students"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.gravitypay.app/v1/students")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.gravitypay.app/v1/students")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "clx1student01",
"object": "student",
"name": "Maria Souza",
"email": "maria@example.com",
"avatarUrl": null,
"lastLoginAt": "2026-09-10T08:00:00.000Z",
"createdAt": "2026-06-11T14:20:00.000Z",
"enrollments": [
{
"id": "clx1enroll001",
"object": "enrollment",
"status": "ACTIVE",
"hasAccess": true,
"source": "PURCHASE",
"course": {
"id": "clx1course0001",
"title": "Formação em NR-35",
"productId": "clx1product001"
},
"cohort": {
"id": "clx1cohort002",
"name": "Mentoria",
"isDefault": false
},
"grantedAt": "2026-06-11T14:21:00.000Z",
"expiresAt": null,
"revokedAt": null,
"revokeReason": null,
"guaranteeEndsAt": "2026-06-18T14:21:00.000Z",
"paymentId": "clx1payment01",
"subscriptionId": null,
"createdAt": "2026-06-11T14:21:00.000Z"
}
]
}
],
"page": 1,
"perPage": 50,
"total": 1,
"totalPages": 1,
"hasMore": false
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"requiredScope": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"requiredScope": "<string>"
}
}{
"error": {
"type": "insufficient_scope",
"message": "Esta chave de API não tem o escopo students:read.",
"requiredScope": "students:read"
}
}Listar alunos
Lista paginada dos alunos da loja da chave, cada um com todas as matrículas. Os filtros de matrícula (courseId, cohortId, enrollmentStatus) devolvem os alunos com ao menos uma matrícula que casa com todos eles, e enrollments continua com todas as matrículas. O aluno de pré-visualização do seller nunca aparece. Ordem: createdAt decrescente e, no empate, id decrescente. As matrículas de enrollments vêm por createdAt crescente e, no empate, id crescente.
Escopo exigido: students:read.
curl --request GET \
--url https://api.sandbox.gravitypay.app/v1/students \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.gravitypay.app/v1/students"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.gravitypay.app/v1/students', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.gravitypay.app/v1/students",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.gravitypay.app/v1/students"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.gravitypay.app/v1/students")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.gravitypay.app/v1/students")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "clx1student01",
"object": "student",
"name": "Maria Souza",
"email": "maria@example.com",
"avatarUrl": null,
"lastLoginAt": "2026-09-10T08:00:00.000Z",
"createdAt": "2026-06-11T14:20:00.000Z",
"enrollments": [
{
"id": "clx1enroll001",
"object": "enrollment",
"status": "ACTIVE",
"hasAccess": true,
"source": "PURCHASE",
"course": {
"id": "clx1course0001",
"title": "Formação em NR-35",
"productId": "clx1product001"
},
"cohort": {
"id": "clx1cohort002",
"name": "Mentoria",
"isDefault": false
},
"grantedAt": "2026-06-11T14:21:00.000Z",
"expiresAt": null,
"revokedAt": null,
"revokeReason": null,
"guaranteeEndsAt": "2026-06-18T14:21:00.000Z",
"paymentId": "clx1payment01",
"subscriptionId": null,
"createdAt": "2026-06-11T14:21:00.000Z"
}
]
}
],
"page": 1,
"perPage": 50,
"total": 1,
"totalPages": 1,
"hasMore": false
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"requiredScope": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"requiredScope": "<string>"
}
}{
"error": {
"type": "insufficient_scope",
"message": "Esta chave de API não tem o escopo students:read.",
"requiredScope": "students:read"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Página (começa em 1). Página além da última devolve data vazio e hasMore false.
x >= 1Itens por página (1 a 100; default 50).
1 <= x <= 100Devolve só o aluno com este e-mail, sem diferenciar maiúsculas.
Alunos com matrícula neste curso. Curso de outra loja responde 400.
Alunos com matrícula nesta turma. Turma de outra loja responde 400.
Alunos com matrícula neste status.
ACTIVE, REVOKED 
