Appearance
Quickstart Guide
Get started with the Netra API in under 5 minutes. This guide will walk you through making your first API call and creating your first entity for risk assessment.
Prerequisites
Before you begin, ensure you have:
- A Netra account with API access
- Basic knowledge of REST APIs
- A tool to make HTTP requests (curl, Postman, or your preferred programming language)
Step 1: Get Your API Key
- Log in to your Netra application
- Navigate to the Agent interface
- Click the Settings icon (⚙️) in the bottom toolbar
- Select API Keys under Account in the left menu
- Click Create and give your key a descriptive name
- Copy your API key immediately - you won't be able to see it again
WARNING
Store your API key securely and never commit it to version control. Treat it like a password.
Step 2: Test Your Connection
Let's verify your API key works by fetching your existing entities:
bash
curl -X GET "https://api.netra.technology/api/v1/entities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Expected Response (first-time users):
json
[]
Expected Response (if you've already created entities via the Netra interface):
json
[
{
"id": "clw6f1o00000008j7e5m4d0t2",
"name": "Example Corp",
"type": "organization",
"caseStatus": "NOT_STARTED",
"countryCode": "US",
"riskLevel": "Low Risk",
"riskScore": 20
}
]
Step 3: Create Your First Entity
Now let's create a new organization for risk assessment:
bash
curl -X POST "https://api.netra.technology/api/v1/entities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation Ltd",
"type": "organization",
"countryCode": "GB",
"registration": "12345678"
}'
Response:
json
{
"success": true,
"data": {
"id": "clw6g1p00000008j7e5m4d0t2",
"name": "Acme Corporation Ltd",
"type": "organization",
"countryCode": "GB",
"caseStatus": "NOT_STARTED",
"netraId": "abc123def456",
"createdAt": "2025-01-14T10:00:00.000Z"
}
}
TIP
Creating an entity automatically triggers Netra's screening and enrichment processes. The caseStatus will change from NOT_STARTED to IN_PROGRESS as processing begins.
Step 4: Create a Person Entity
Let's also create a person for comprehensive risk assessment:
bash
curl -X POST "https://api.netra.technology/api/v1/entities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "John Smith",
"type": "person",
"countryCode": "US",
"birthDate": "1975-06-15",
"nationalId": "123-45-6789"
}'
Step 5: Retrieve Entity Network
Once processing is complete, you can retrieve the full network graph and risk assessment:
bash
curl -X GET "https://api.netra.technology/api/v1/entities/{entity_id}/network" \
-H "Authorization: Bearer YOUR_API_KEY"
This returns comprehensive risk intelligence including:
- PEP Status: Politically Exposed Person indicators
- Sanctions: Matches against global sanctions lists
- Adverse Media: Negative news mentions
- Network Relationships: Connected entities and their risk profiles
- Risk Score: Calculated overall risk assessment
Common Use Cases
Bulk Entity Creation
For importing large datasets, use the bulk endpoint:
bash
curl -X POST "https://api.netra.technology/api/v1/entities/bulk" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entities": [
{
"name": "Company A Ltd",
"type": "organization",
"country": "GB"
},
{
"name": "Jane Doe",
"type": "person",
"country": "US",
"first_name": "Jane",
"last_name": "Doe"
}
]
}'
Document Analysis
Add supporting documents to entities for enhanced analysis:
bash
curl -X POST "https://api.netra.technology/api/v1/entities/{entity_id}/documents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_url": "https://example.com/financial-statement.pdf",
"type": "financial_statement",
"title": "Q4 2024 Financial Statement"
}'
Web Search Integration
Search for entities before creating them to avoid duplicates:
bash
curl -X POST "https://api.netra.technology/api/search/organizations" \
-H "Content-Type: application/json" \
-d '{
"company_name": "Siemens AG",
"country": "Germany"
}'
Code Examples
JavaScript/Node.js
javascript
const NETRA_API_KEY = process.env.NETRA_API_KEY;
const BASE_URL = 'https://api.netra.technology/api/v1';
async function createEntity(entityData) {
const response = await fetch(`${BASE_URL}/entities`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${NETRA_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(entityData)
});
return await response.json();
}
// Usage
const newEntity = await createEntity({
name: "Tech Innovations Inc",
type: "organization",
countryCode: "US"
});
Python
python
import requests
import os
NETRA_API_KEY = os.getenv('NETRA_API_KEY')
BASE_URL = 'https://api.netra.technology/api/v1'
def create_entity(entity_data):
headers = {
'Authorization': f'Bearer {NETRA_API_KEY}',
'Content-Type': 'application/json'
}
response = requests.post(
f'{BASE_URL}/entities',
headers=headers,
json=entity_data
)
return response.json()
# Usage
new_entity = create_entity({
"name": "Global Solutions Ltd",
"type": "organization",
"countryCode": "CA"
})
Next Steps
Now that you've successfully made your first API calls:
- Explore the full API reference: Check out our comprehensive API documentation
- Learn about authentication: Read our authentication guide for security best practices
- Understand our methodology: Discover how Netra's risk assessment works
- Review data sources: See our global coverage of risk intelligence sources
Need Help?
- Documentation: Browse our complete API reference
- Support: Contact our team at support@netra.technology