Get your API key
Retrieve your API key from the Artu Dashboard . All requests require two things: an API key and a target environment (test or live).
Start with the test environment. Test data is fully isolated and never
submitted to regulators.
Choose your path
Install the SDK Initialize import { ComplianceSDK } from "@artu-ai/compliance-sdk" ;
const sdk = new ComplianceSDK ({
apiKey: process . env . ARTU_API_KEY ,
environment: "test" ,
});
Create your first client import { ClientType } from "@artu-ai/compliance-sdk" ;
const client = await sdk . clients . create ({
type: ClientType . Individual ,
name: "Juan García López" ,
scopeData: {
MX: {
rfc: "GALJ850101ABC" ,
curp: "GALJ850101HDFRRL09" ,
},
},
});
console . log ( `Created client: ${ client . id } ` );
List clients const { data , pagination } = await sdk . clients . list ({ limit: 10 });
for ( const client of data ) {
console . log ( client . name );
}
// Or use the async iterator — pagination is handled automatically
for await ( const client of sdk . clients . iterate ()) {
console . log ( client . name );
}
Create your first client curl https://api.artu.ai/v1/clients \
-X POST \
-H "Authorization: Bearer sk_test_..." \
-H "X-Environment: test" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"name": "Juan García López",
"scopeData": {
"MX": {
"rfc": "GALJ850101ABC",
"curp": "GALJ850101HDFRRL09"
}
}
}'
List clients curl "https://api.artu.ai/v1/clients?limit=10" \
-H "Authorization: Bearer sk_test_..." \
-H "X-Environment: test"
The response includes a pagination object with nextCursor and hasMore fields for paging through results.
Pick a scope
Most integrations target a specific compliance track. Pass a scope to the SDK (or add an X-Scope header to HTTP requests) to filter data and unlock scope-specific fields and types.
// TypeScript SDK — AVI-scoped instance
const sdk = new ComplianceSDK ({
apiKey: process . env . ARTU_API_KEY ,
environment: "test" ,
scope: "MX:AV:AVI" ,
});
See Scopes overview for the full list of available scopes and the fields each one exposes.
Next steps
Scopes overview Choose the right scope for your compliance track.
TypeScript SDK reference Constructor options, all resource managers, and scoped sub-exports.
API Reference Full interactive HTTP endpoint reference.
Client guide Deep dive into managing clients, linked clients, and batch operations.