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 ParametersExpand Collapse
schema: map[object { content_type, display_hint, field_limit, namespace_ref } ]

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.

content_type: optional "image_url" or "video_url" or "website_url" or 2 more

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

Accepts one of the following:
"image_url"
"video_url"
"website_url"
"datetime"
"metadata"
display_hint: optional object { type }

Display hint for UI rendering of this field

type: "title" or "subtitle" or "description" or 12 more

The display hint type

Accepts one of the following:
"title"
"subtitle"
"description"
"primary_image_url"
"video_url"
"location"
"compact_text"
"markdown"
"email.reply_to"
"email.body"
"email.subject"
"email.body_image"
"email.logo_image"
"email.event"
"email.footer"
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
namespace_ref: optional string

The namespace which an id refers to, creating a parent-child relationship with that namespace.

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"
}