Skip to main content

First API Call

This guide walks through making your first successful API call — listing studies.

Prerequisites

  • You have a client_id and client_secret (see Authentication)
  • Your client has the Study Management or Study Reporting role bundle (includes STUDY_READ)

Step 1 — Get a token

curl -X POST https://api.account.dev.patholytix.com/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"

Copy the access_token value from the response.

Step 2 — List studies

curl "https://api.dev.patholytix.com/api/v1/studies?page=0&size=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"elements": [
{
"id": "5cd97ae75fdbf7000143cb30",
"name": "Phase II Oncology Study",
"description": "Sample study",
"siteId": "698b6bb4b4469696051e32ad",
"status": "ACTIVE",
"createdDate": "2026-01-07T12:55:14.041Z",
"updatedDate": "2026-01-07T12:55:14.041Z"
}
],
"totalElements": 1,
"totalPages": 1,
"pageNumber": 0,
"pageSize": 10
}

Step 3 — Fetch a single study

curl "https://api.dev.patholytix.com/api/v1/studies/5cd97ae75fdbf7000143cb30" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

What next?