Skip to content
StatusSupportDashboard

Update namespace settings

PUT/v1/data/{namespace}/settings

Create or replace settings for a namespace, primarily used to change the schema associated with the namespace.

Path ParametersExpand Collapse
namespace: string

The namespace to ingest data into

Body ParametersJSONExpand Collapse
schema: map[object { belongs_to, content_type, display_hint, 2 more } ]

Schema mapping field names to their definitions. Use content_type to specify which fields contain URLs that should be processed (images, videos, or websites), datetime fields, or ‘metadata’ for fields that should be stored but not indexed. Use display_hint to provide UI rendering hints.

belongs_to: optional string

The parent object namespace this field belongs to, creating a parent-child relationship with that namespace.

content_type: optional "image_url" or "video_url" or "audio_url" or 4 more

The type of content (image_url, video_url, audio_url, website_url, datetime, metadata, or card). When specified as a URL type, SafetyKit will process the URL. Use ‘metadata’ for fields that should be stored but not indexed.

One of the following:
"image_url"
"video_url"
"audio_url"
"website_url"
"datetime"
"metadata"
"card"
display_hint: optional object { name, order, type }

Display hint for UI rendering of this field

name: optional string

Display label to show for this field in the UI

order: optional number

Display ordering for this field. Use 0 to hide the field from list views.

type: optional "title" or "subtitle" or "description" or 11 more

The display hint type

One of the following:
"title"
"subtitle"
"description"
"primary_image_url"
"video_url"
"audio_url"
"location"
"date"
"compact_text"
"markdown"
"html"
"card"
"chat_thread"
"two_person_chat"
field_limit: optional number

Maximum amount of this field to include when sending to AI models. For text fields, this is the character limit. For array fields (e.g. image URLs), this is the maximum number of items.

minimum0
exclusiveMinimum
ingest_as: optional "float"

Optional parser to apply before indexing this field.

ReturnsExpand Collapse
namespace: string
status: "updated"

Update namespace settings

curl https://api.safetykit.com/v1/data/$NAMESPACE/settings \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $SAFETYKIT_API_KEY" \
    -d '{
          "schema": {
            "profile_image": {
              "content_type": "image_url"
            },
            "cover_photo": {
              "content_type": "image_url"
            },
            "website": {
              "content_type": "website_url"
            }
          }
        }'
{
  "namespace": "users",
  "status": "updated"
}
Returns Examples
{
  "namespace": "users",
  "status": "updated"
}