Skip to content
StatusSupportDashboard

Add data

POST/v1/data/{namespace}

Add data to a namespace. This method returns immediately; data is processed asynchronously.

Path ParametersExpand Collapse
namespace: string

The namespace to ingest data into

Body ParametersJSONExpand Collapse
data: object { id } or array of object { id }

A data object to ingest. Must have an id field. All other fields are flexible and can any JSON types.

One of the following:
DataObject = object { id }

A data object to ingest. Must have an id field. All other fields are flexible and can any JSON types.

id: string

Unique identifier for this data object. This should be a meaningful identifier in the customer's system, as it is the main way to search for specific items between systems.

DataObjectArray = array of object { id }

Array of data objects to ingest.

id: string

Unique identifier for this data object. This should be a meaningful identifier in the customer's system, as it is the main way to search for specific items between systems.

ReturnsExpand Collapse
requestId: string

Unique identifier for tracking this request. Data processing happens asynchronously after this response.

status: "accepted"

Request was accepted for processing

Add data

curl https://api.safetykit.com/v1/data/$NAMESPACE \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $SAFETYKIT_API_KEY" \
    -d '{
          "data": {
            "id": "user-12345"
          }
        }'
{
  "requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
  "status": "accepted"
}
Returns Examples
{
  "requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
  "status": "accepted"
}