Skip to main content

Quickstart

Make your first neuroflash API call in under 2 minutes.

Prerequisites

  • A neuroflash account with API access
  • Your client_id and client_secret from Service Accounts in the neuroflash app

Step 1: Get an Access Token

Exchange your credentials for an access token:

curl -X POST https://id.neuroflash.com/oauth/v2/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" \
-d "scope=openid"

The response includes an access_token valid for approximately 4 hours. See Authentication for full details.

Step 2: Fetch Your Workspace

Most API endpoints require a workspace ID. Fetch your workspaces to get one:

curl https://app.neuroflash.com/api/workspace-service/v1/workspaces \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example response:

{
"data": [
{
"id": "abc123",
"name": "My Workspace",
"role": "owner"
}
]
}

Step 3: Make Your First API Call

Use your workspace ID to list available demographic groups for digital twins:

curl https://app.neuroflash.com/api/digital-twin-service/v1/static-groups \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example response:

[
{
"id": "gen-z",
"name": "Gen Z",
"description": "Born 1997–2012",
"twinsCount": 5
},
{
"id": "millennials",
"name": "Millennials",
"description": "Born 1981–1996",
"twinsCount": 5
}
]

You've just made your first neuroflash API call.

Next Steps