Introduction
With SafetyKit, you can deploy AI agents to automate risk reviews, onboarding, and investigations. Trusted by leading marketplaces and fintech platforms.
Quickstart: Data API
Section titled “Quickstart: Data API”The Data API lets you ingest data into SafetyKit for processing and analysis. This is perfect for syncing your users, products, transactions, or any entity you want SafetyKit to understand.
curl -X POST https://api.safetykit.com/v1/data/users \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "data": [ { "id": "user_12345", "email": "alice@example.com", "username": "alice_wonderland", "profile_image": "https://example.com/alice.jpg", "bio": "Just a curious person exploring the world!", "created_at": "2024-01-15T10:30:00Z" } ] }'import Safetykit from "safetykit";
// Initialize the client with your API keyconst client = new Safetykit({ apiKey: "sk_your_api_key",});
// Ingest users into the "users" namespaceconst response = await client.data.ingest("users", { data: [ { id: "user_12345", email: "alice@example.com", username: "alice_wonderland", profile_image: "https://example.com/alice.jpg", bio: "Just a curious person exploring the world!", created_at: "2024-01-15T10:30:00Z", }, ],});
console.log(`✓ Data accepted: ${response.requestId}`);from safetykit import Safetykit
# Initialize the client with your API keyclient = Safetykit(api_key="sk_your_api_key")
# Ingest users into the "users" namespaceresponse = client.data.ingest("users", { "data": [ { "id": "user_12345", "email": "alice@example.com", "username": "alice_wonderland", "profile_image": "https://example.com/alice.jpg", "bio": "Just a curious person exploring the world!", "created_at": "2024-01-15T10:30:00Z" } ]})
print(f"✓ Data accepted: {response.request_id}")import java.net.URIimport java.net.http.HttpClientimport java.net.http.HttpRequestimport java.net.http.HttpResponse
val client = HttpClient.newHttpClient()
val body = """ { "data": [ { "id": "user_12345", "email": "alice@example.com", "username": "alice_wonderland", "profile_image": "https://example.com/alice.jpg", "bio": "Just a curious person exploring the world!", "created_at": "2024-01-15T10:30:00Z" } ] }""".trimIndent()
val request = HttpRequest.newBuilder() .uri(URI.create("https://api.safetykit.com/v1/data/users")) .header("Authorization", "Bearer sk_your_api_key") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)) .build()
val response = client.send(request, HttpResponse.BodyHandlers.ofString())println("Data accepted: ${response.body()}")import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
String body = """ { "data": [ { "id": "user_12345", "email": "alice@example.com", "username": "alice_wonderland", "profile_image": "https://example.com/alice.jpg", "bio": "Just a curious person exploring the world!", "created_at": "2024-01-15T10:30:00Z" } ] } """;
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.safetykit.com/v1/data/users")) .header("Authorization", "Bearer sk_your_api_key") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)) .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());System.out.println("Data accepted: " + response.body());What happens next? SafetyKit processes your data asynchronously. You can set up webhooks to get notified when processing completes. See Copy-and-Paste Quickstart for more starter code.
Install the SDK
Section titled “Install the SDK”As an alternative to using the API directly, we offer TypeScript, Python, Kotlin, and Java SDKs to handle authentication, retries, and type safety out of the box.
npm install safetykitpip install safetykitimplementation("com.safetykit:safetykit-kotlin:0.2.0")implementation 'com.safetykit:safetykit-kotlin:0.2.0'<dependency> <groupId>com.safetykit</groupId> <artifactId>safetykit-kotlin</artifactId> <version>0.2.0</version></dependency>implementation("com.safetykit:safetykit-java:0.2.0")implementation 'com.safetykit:safetykit-java:0.2.0'<dependency> <groupId>com.safetykit</groupId> <artifactId>safetykit-java</artifactId> <version>0.2.0</version></dependency>Next steps
Section titled “Next steps” Webhooks Get real-time notifications when processing completes.
API Reference Explore the complete API documentation.
Need help?
Section titled “Need help?”We’re here for you! Contact us at support@safetykit.com.