Skip to main content
PATCH
/
v1
/
retrievers
/
{retriever_id}
/
publish
Update Published Retriever
curl --request PATCH \
  --url https://api.mixpeek.com/v1/retrievers/{retriever_id}/publish \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Namespace: <x-namespace>' \
  --data @- <<EOF
{
  "display_config": {
    "components": {
      "result_card": {
        "field_order": [
          "title",
          "description",
          "price"
        ],
        "layout": "vertical",
        "show_thumbnail": true
      },
      "result_layout": "grid",
      "show_search": true
    },
    "description": "Search through our product catalog",
    "exposed_fields": [
      "title",
      "description",
      "price",
      "image_url"
    ],
    "field_config": {
      "price": {
        "format": "number",
        "format_options": {
          "decimals": 2,
          "label": "Price",
          "prefix": "$"
        }
      },
      "title": {
        "format": "text",
        "format_options": {
          "label": "Product Name",
          "truncate_chars": 60
        }
      }
    },
    "inputs": [
      {
        "field_name": "query",
        "field_schema": {
          "description": "Search query",
          "examples": [
            "wireless headphones",
            "laptop"
          ],
          "type": "string"
        },
        "label": "Search Products",
        "order": 0,
        "placeholder": "What are you looking for?",
        "required": true
      }
    ],
    "layout": {
      "columns": 3,
      "gap": "16px",
      "mode": "grid"
    },
    "logo_url": "https://example.com/logo.png",
    "markdowns": [
      {
        "content": "# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters",
        "title": "How it Works"
      },
      {
        "content": "## Tips for Better Results\n\n1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")\n2. Try different keywords if you don't find what you're looking for\n3. Use filters to narrow down results\n\n*Happy searching!* 🔍",
        "title": "Search Guide"
      },
      {
        "content": "This product search is powered by AI technology that understands what you're looking for, even if you don't use the exact keywords.\n\n[Learn more about our technology](https://example.com/docs)",
        "title": "About"
      }
    ],
    "theme": {
      "font_family": "Inter, sans-serif",
      "primary_color": "#007AFF"
    },
    "title": "Product Search"
  },
  "rate_limit_config": {
    "description": "Standard tier (default) - 10/min, 100/hour, 1k/day",
    "enabled": true,
    "max_results_per_query": 50,
    "tier": "standard"
  },
  "password_secret_name": "<string>",
  "is_active": true
}
EOF
{
  "retriever_id": "<string>",
  "retriever_name": "<string>",
  "public_name": "<string>",
  "display_config": {
    "title": "<string>",
    "inputs": [
      {
        "field_name": "<string>",
        "field_schema": {
          "type": "string",
          "default": "<unknown>",
          "items": "<unknown>",
          "properties": {},
          "examples": [
            "<unknown>"
          ],
          "description": "<string>",
          "enum": [
            "<unknown>"
          ],
          "required": false
        },
        "label": "<string>",
        "placeholder": "Enter search terms...",
        "helper_text": "Describe the aesthetic, outfit, or vibe you're looking for",
        "suggestions": [
          "streetwear urban",
          "clean girl minimal",
          "summer haul bright"
        ],
        "required": true,
        "order": 0
      }
    ],
    "exposed_fields": [
      "<string>"
    ],
    "description": "Search through thousands of products",
    "logo_url": "https://example.com/logo.png",
    "og_image_url": "https://s3.amazonaws.com/mixpeek-server-dev/org123/ns456/public-retriever-og-images/video-search/og.png",
    "markdowns": [
      {
        "title": "<string>",
        "content": "<string>"
      }
    ],
    "theme": {
      "primary_color": "#007AFF",
      "secondary_color": "#FF6B6B",
      "font_family": "system-ui, -apple-system, sans-serif",
      "background_color": "#FFFFFF",
      "text_color": "#000000"
    },
    "layout": {
      "mode": "grid",
      "columns": 3,
      "gap": "16px"
    },
    "components": {
      "show_search": true,
      "show_filters": false,
      "result_layout": "grid",
      "result_card": {
        "layout": "vertical",
        "show_thumbnail": true,
        "thumbnail_aspect_ratio": "16/9",
        "thumbnail_fit": "cover",
        "show_score": false,
        "truncate_title": 60,
        "truncate_description": 120,
        "field_order": [
          "<string>"
        ]
      }
    },
    "field_config": {}
  },
  "public_id": "<string>",
  "public_api_key": "<string>",
  "rate_limit_config": {
    "enabled": true,
    "tier": "standard",
    "requests_per_minute": 2,
    "requests_per_hour": 2,
    "requests_per_day": 2,
    "max_results_per_query": 100,
    "enable_ip_limits": false,
    "max_requests_per_ip_hour": 2
  },
  "password_secret_name": "published_retriever_password",
  "is_active": true,
  "retriever_metadata": {
    "stages": [
      {}
    ],
    "collections": [
      {}
    ],
    "capabilities": {}
  },
  "internal_id": "<string>",
  "namespace_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

retriever_id
string
required

ID of the retriever

Body

application/json

Request to update a published retriever configuration.

display_config
DisplayConfig · object

Update the display configuration

Example:
{
"components": {
"result_card": {
"field_order": ["title", "description", "price"],
"layout": "vertical",
"show_thumbnail": true
},
"result_layout": "grid",
"show_search": true
},
"description": "Search through our product catalog",
"exposed_fields": [
"title",
"description",
"price",
"image_url"
],
"field_config": {
"price": {
"format": "number",
"format_options": {
"decimals": 2,
"label": "Price",
"prefix": "$"
}
},
"title": {
"format": "text",
"format_options": {
"label": "Product Name",
"truncate_chars": 60
}
}
},
"inputs": [
{
"field_name": "query",
"field_schema": {
"description": "Search query",
"examples": ["wireless headphones", "laptop"],
"type": "string"
},
"label": "Search Products",
"order": 0,
"placeholder": "What are you looking for?",
"required": true
}
],
"layout": {
"columns": 3,
"gap": "16px",
"mode": "grid"
},
"logo_url": "https://example.com/logo.png",
"markdowns": [
{
"content": "# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters",
"title": "How it Works"
},
{
"content": "## Tips for Better Results\n\n1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")\n2. Try different keywords if you don't find what you're looking for\n3. Use filters to narrow down results\n\n*Happy searching!* 🔍",
"title": "Search Guide"
},
{
"content": "This product search is powered by AI technology that understands what you're looking for, even if you don't use the exact keywords.\n\n[Learn more about our technology](https://example.com/docs)",
"title": "About"
}
],
"theme": {
"font_family": "Inter, sans-serif",
"primary_color": "#007AFF"
},
"title": "Product Search"
}
rate_limit_config
RateLimitConfig · object

Update rate limiting configuration

Example:
{
"description": "Standard tier (default) - 10/min, 100/hour, 1k/day",
"enabled": true,
"max_results_per_query": 50,
"tier": "standard"
}
password_secret_name
string | null

Update or remove password protection (set to empty string to remove)

is_active
boolean | null

Activate or deactivate the published retriever

Response

Successful Response

Published retriever model stored in MongoDB.

Uses retriever_id as the primary identifier. Published state is tracked by the existence of this document.

Key Design Decisions:

  • retriever_id is the primary identifier (1:1 with Retriever)
  • public_id is auto-generated for external/shareable references
  • public_api_key is stored in plain text (it's public by design)
  • internal_id and namespace_id are automatic from provider
  • display_config is a structured Pydantic model (not Dict)
  • retriever_metadata is optional technical info (separate from display)
retriever_id
string
required

ID of the underlying retriever being published. This is the primary identifier - one retriever can only be published once.

retriever_name
string
required

Name of the underlying retriever (denormalized for performance). Populated during publishing to avoid extra lookups during execution.

public_name
string
required

Public URL-safe slug for the retriever (e.g., 'video-search'). Used in the public URL: apps.mixpeek.com/r/{public_name}

Required string length: 3 - 50
display_config
DisplayConfig · object
required

Structured configuration for how to render the public search UI. Includes input fields, theme, layout, and exposed result fields. Frontend uses this to dynamically build the interface.

public_id
string

Public-facing identifier for this published retriever. Auto-generated with 'pub_' prefix. Used in public URLs and references.

public_api_key
string

Public API key for this retriever (stored in plain text). Scoped to this retriever only. Auto-generated with 'prk_' prefix. Safe to share - it's read-only and limited to this retriever.

rate_limit_config
RateLimitConfig · object

Rate limiting configuration for the public endpoint

password_secret_name
string | null

OPTIONAL. Name of organization secret containing password for access protection. If set, users must provide password via X-Retriever-Password header.

Example:

"published_retriever_password"

is_active
boolean
default:true

Whether the published retriever is active and accessible

retriever_metadata
RetrieverMetadata · object

OPTIONAL. Technical metadata explaining how the retriever works. Includes: stages, collections, extractors, capabilities. Only populated if include_metadata=True during publishing.

internal_id
string | null

Organization internal ID (automatically added by provider)

namespace_id
string | null

Namespace ID (automatically added by provider)

created_at
string<date-time> | null

Timestamp when published (automatically added by provider)

updated_at
string<date-time> | null

Timestamp when last updated (automatically added by provider)