Access via GraphQL API
The OSO GraphQL API exposes a programmatic interface for everything users can do on the OSO platform. Let's make your first query in under five minutes.
warning
If you want to execute SQL against your organization's data, use the pyoso Python library instead.
Generate an API key
- Log in to your account
- Navigate to your organization's Settings → API Keys
- Click "New Key +" and give it a descriptive name
- Save your key immediately - you won't see it again
Detailed step-by-step instructions
- Go to www.oso.xyz and log in
- You'll be redirected to your organization dashboard
- In the left sidebar, click the dropdown next to your organization name
- Select "Settings"
- Navigate to "Organization" → "API Keys"
- Click "New Key +"
- Enter a descriptive label (e.g., "Production API")
- Copy and save your key immediately
- Click "Create"

Prepare your query
You can navigate to our public GraphQL explorer to explore the schema and execute test queries.

For example, this query will fetch the current user.
query Viewer {
viewer {
id
email
fullName
avatarUrl
}
}
Issue your first API request
All API requests are sent to the following URL:
https://api.oso.xyz/v1/graphql
In order to authenticate with the API service, you have to use the Authorization HTTP header and Bearer authentication on all HTTP requests
- curl
- JavaScript
- Python
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEVELOPER_API_KEY" \
-d '{"query":"query Viewer { viewer { id email fullName avatarUrl } }"}' \
https://api.oso.xyz/v1/graphql
const query = `
query Viewer {
viewer {
id
email
fullName
avatarUrl
}
}
`;
const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${DEVELOPER_API_KEY}`,
};
const response = await fetch('https://api.oso.xyz/v1/graphql', {
method: 'POST',
headers: headers,
body: JSON.stringify({
query: query
}),
});
const data = await response.json();
console.log(data);
import requests
query = """
query Viewer {
viewer {
id
email
fullName
avatarUrl
}
}
"""
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {DEVELOPER_API_KEY}'
}
response = requests.post(
'https://api.oso.xyz/v1/graphql',
json={'query': query},
headers=headers
)
data = response.json()
print(data)