Getting Started
Step 1: Create a Triand Account
Visit /signup to create a Triand user account. This is the same account used across all Triand services. If you already have an account, skip to Step 2.
Step 2: Apply for API Access
While logged in, visit /api-signup to submit your API access application. You will need:
- Your company name and a description of how you plan to use the API
- Your desired access scope (which districts/schools)
- A payment method (credit card via Stripe — not charged until approval)
Your contact name and email will be pre-filled from your Triand account.
Step 3: Wait for Approval
A Triand administrator will review your application and configure your data access scope. This typically takes 1-2 business days. You will receive an email with the outcome.
Step 4: Log In via the API
Once approved, use the login endpoint to get a Bearer token (PJWT) for API access. Call POST /v1/login with your Triand email and password:
curl -X POST https://api.triand.com/v1/login \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"email": "you@example.com",
"password": "your-password"
}' The response includes a pjwt token valid for 24 hours:
{
"actionOk": true,
"pjwt": "eyJhbGciOiJIUzUxMiI...",
"expiresIn": 86400
} Important: You will receive your API key (x-api-key) via email upon approval. The Bearer token is obtained dynamically via the login endpoint — it is not emailed to you.
Step 5: Make Your First API Call
Use the PJWT from the login response as your Bearer token:
curl -X POST https://api.triand.com/v1/students \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_PJWT_TOKEN" \
-d '{
"limit": 5,
"districtlea": "1503000"
}' Or using JavaScript fetch:
const response = await fetch('https://api.triand.com/v1/students', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY',
'Authorization': 'Bearer YOUR_PJWT_TOKEN',
},
body: JSON.stringify({
limit: 5,
districtlea: '1503000',
}),
})
const data = await response.json()
console.log(data.students) Understanding the Response
A successful response looks like:
{
"actionOk": true,
"error": [],
"total": 3,
"students": { "12345": { ... }, "12346": { ... }, ... },
"schools": { "987": { "name": "DeWitt High School", ... } },
"districts": { "45": { "name": "DeWitt School District", ... } },
"avatars": { ... }
} The response contains:
- actionOk —
trueif the request succeeded - error — Array of error codes (empty on success)
- total — Total matching records
- students/schools/districts — Keyed objects with the actual data