Download OpenAPI specification:Download
We've made API version 2 available for beta testing. We would appreciate your feedback.
expand
query parameter.Please visit our help article to learn how to create an API key.
API V2 is designed to provide a faster an more flexible way of accessing Drata. There are several differences from V1:
async function fetchAll() {
// The first request doesn't send a value for the cursor.
let cursor = undefined;
do {
const query = new URLSearchParams({ cursor });
const resp = await fetch(
`https://public-api.drata.com/public/v2/users?${query}`,
{
method: 'GET',
headers: { Authorization: 'Bearer <YOUR_API_KEY_HERE>' }
}
);
const data = await resp.json();
console.log(data);
// If there's a cursor value returned, then there are more results.
// Pass that back as a query parameter to get the next page of data.
cursor = data?.pagination?.cursor;
} while (cursor)
}
fetchAll();
expand
query parameter that let's you specify which related objects and collections you want to expand.The Company tracks essential information about your organization. The help docs have more information on the purpose of each field.
๐ Requires Company Settings: Get Company Settings permission.
Successful
Malformed data and/or validation errors
Invalid Authorization
You must upgrade your plan to use this feature
You are not allowed to perform this action
Not Found
You must accept the Drata terms and conditions to use the API
Internal server error
{- "accountId": "aaaaaaaa-bbbb-0000-cccc-dddddddddddd",
- "domain": "domain.com",
- "name": "Acme",
- "legalName": "Acme Inc.",
- "year": 2014,
- "description": "We make tools",
- "phoneNumber": "800-555-5555",
- "address": "742 Evergreen Terrace, Springfield, OH 45501",
- "securityTraining": "DRATA_PROVIDED",
- "hipaaTraining": "DRATA_PROVIDED",
- "backgroundCheck": "CERTN",
- "securityReport": {
- "visibility": "PASSING",
- "sharing": true,
- "shareToken": "aaaaaaaa-bbbb-0000-cccc-dddddddddddd"
}, - "adminOnboardedAt": "2025-07-01T16:45:55.246Z",
- "renewalPeriodStartDate": "2025-07-01T16:45:55.246Z",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "agentEnabled": false,
- "manualUploadEnabled": false,
- "drataSupportAccess": {
- "enabledAt": "2025-07-01T16:45:55.246Z",
- "expiresAt": "2025-07-01T16:45:55.246Z",
- "type": "READ_ONLY"
}, - "entitlements": [
- {
- "name": "string",
- "description": "string",
- "type": "string",
- "featureId": 0,
- "metadata": { }
}
], - "language": "ENGLISH_US"
}