Skip to content
StatusSupportDashboard
Using the Data API

Adding and Updating Data

Ingest single objects or small batches and update existing objects with stable IDs.

Use POST /v1/data/{namespace} to send single objects or small batches in arrays. This endpoint is the fastest way to integrate ongoing production traffic where objects arrive continuously.

Using a stable id is important for:

  • matching webhook outputs to your internal records
  • re-processing when object data changes
  • maintaining object history in one identity
import Safetykit from "safetykit";
const client = new Safetykit({
apiKey: process.env.SAFETYKIT_API_KEY,
});
const response = await client.data.ingest("products", {
data: [
{
id: "product_12345",
title: "Ceramic Mug",
description: "Handmade mug, 12oz",
images: ["https://example.com/mug.jpg"],
price: 24.0,
},
],
});
console.log(response.requestId);

To update an object, send the same id again. The service will treat it as a new evaluation for that entity identity, which keeps your latest state and decisions aligned.

{
"data": {
"id": "product_12345",
"title": "Ceramic Mug - Updated",
"price": 28.0
}
}

In most integrations, you should persist both id and requestId from each call so you can reconcile webhook events, monitor replay jobs, and debug edge cases quickly.

For large imports, see Adding Data in Batches.