PUT
/
v1
/
namespaces
/
{namespace}
curl --request PUT \
  --url https://api.mixpeek.com/v1/namespaces/{namespace} \
  --header 'Content-Type: application/json' \
  --data '{
  "namespace_name": "spotify_playlists_dev",
  "payload_indexes": [
    {
      "field_name": "metadata.title",
      "field_schema": {
        "lowercase": true,
        "max_token_len": 15,
        "min_token_len": 2,
        "tokenizer": "word",
        "type": "text"
      },
      "type": "text"
    },
    {
      "field_name": "metadata.description",
      "field_schema": {
        "is_tenant": false,
        "type": "keyword"
      },
      "type": "keyword"
    }
  ]
}'
{
  "namespace_id": "<string>",
  "namespace_name": "<string>",
  "embedding_models": [
    "<string>"
  ],
  "payload_indexes": [
    "<any>"
  ]
}

Headers

Authorization
string | null

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings. Example: 'Bearer sk_1234567890abcdef'

Path Parameters

namespace
string
required

Either the namespace name or namespace ID

Body

application/json

Request schema for updating a namespace's payload indexes

namespace_name
string
required

Name of the namespace to update

payload_indexes
object[]
required

Updated list of payload index configurations

Configuration for a payload index

Response

200
application/json
Successful Response
namespace_id
string
required
namespace_name
string
required
embedding_models
string[]
required
payload_indexes
any[] | null
required