Post Create Experience

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.thankly.ai/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Thankly MCP server": {
    "url": "https://docs.thankly.ai/mcp"
  }
}

Close
POST /experiences
application/json

Body Required

  • context object Required

    User context shared across all capabilities.

    Contains cart contents, purchase history, and other signals used for personalization.

    Hide context attributes Show context attributes object
    • cart object | null

      Container for product selections.

      Partners submit products they want to generate widgets for. Can include items from user's cart, browsing history, or curated selections.

      Hide cart attributes Show cart attributes object | null
      • additionalContext object | null
        Hide additionalContext attribute Show additionalContext attribute object | null
        • * string Additional properties
      • vibes array[string] | null

        Mood/vibe for personalizing recommendations.

        Values are adventurous, budget_friendly, cozy, festive, health_conscious, indulgent, minimalist, premium, romantic, or spontaneous.

      • type string Required

        Values are grocery or fashion.

      • products array[object] Required
        Hide products attributes Show products attributes object

        Product in a cart/selection.

        Two modes supported:

        1. Catalog reference (minimal): Only product_id required. Backend hydrates details.
        2. Inline (legacy): Full product details provided directly.

        For catalog-based products (e.g., fashion try-on), provide product_id. Product details are fetched from the catalog database. For inline products (e.g., grocery), provide name and details directly.

        • productId string | null
        • name string | null
        • brand string | null
        • price number | null
        • category string | null
        • quantity integer

          Default value is 1.

        • size string | null
        • unit string | null
        • barcode string | null
        • organic boolean | null

          Default value is false.

        • glutenFree boolean | null

          Default value is false.

    • trip object | null
      Hide trip attributes Show trip attributes object | null
      • additionalContext object | null
        Hide additionalContext attribute Show additionalContext attribute object | null
        • * string Additional properties
      • vibes array[string] | null

        Mood/vibe for personalizing recommendations.

        Values are adventurous, budget_friendly, cozy, festive, health_conscious, indulgent, minimalist, premium, romantic, or spontaneous.

      • flight object | null
        Hide flight attributes Show flight attributes object | null
        • departureAirport string Required
        • arrivalAirport string Required
        • departureTimestamp integer Required
        • arrivalTimestamp integer Required
        • numTravelers integer Required
        • seatClass string Required

          Values are economy, main, premium, business, or first.

      • cruise object | null
        Hide cruise attributes Show cruise attributes object | null
        • departurePort string Required
        • arrivalPort string Required
        • departureTimestamp integer Required
        • arrivalTimestamp integer Required
        • numTravelers integer Required
      • latitude number | null
      • longitude number | null
      • radiusMeters integer | null
    • topic object | null
      Hide topic attributes Show topic attributes object | null
      • additionalContext object | null
        Hide additionalContext attribute Show additionalContext attribute object | null
        • * string Additional properties
      • vibes array[string] | null

        Mood/vibe for personalizing recommendations.

        Values are adventurous, budget_friendly, cozy, festive, health_conscious, indulgent, minimalist, premium, romantic, or spontaneous.

      • topic string Required
      • questions array[string] Required
    • history object | null

      User's purchase/browsing history for personalization.

      Hide history attributes Show history attributes object | null
      • additionalContext object | null
        Hide additionalContext attribute Show additionalContext attribute object | null
        • * string Additional properties
      • vibes array[string] | null

        Mood/vibe for personalizing recommendations.

        Values are adventurous, budget_friendly, cozy, festive, health_conscious, indulgent, minimalist, premium, romantic, or spontaneous.

      • orders array[object]
        Hide orders attributes Show orders attributes object

        A past order from purchase history.

        Two modes supported:

        1. Catalog reference (minimal): Only product_id required. Backend hydrates details.
        2. Inline (legacy): Full product details provided directly.
        • productId string | null
        • name string | null
        • brand string | null
        • category string | null
        • color string | null
        • purchasedAt string | null
    • customer object | null

      Known facts about an identified customer.

      Populated server-side from L2 features in customer_profiles when external_customer_id is present. Partner-supplied fields override server-derived values on conflict (escape hatch for bootstrapping).

      Hide customer attributes Show customer attributes object | null
      • additionalContext object | null
        Hide additionalContext attribute Show additionalContext attribute object | null
        • * string Additional properties
      • vibes array[string] | null

        Mood/vibe for personalizing recommendations.

        Values are adventurous, budget_friendly, cozy, festive, health_conscious, indulgent, minimalist, premium, romantic, or spontaneous.

      • external_customer_id string | null
      • lifecycle_stage string | null
      • age_range string | null
      • zip_code string | null
      • locale string | null
      • membership_tier string | null
      • purchase_summary object | null

        Additional properties are allowed.

      • engagement_summary object | null

        Additional properties are allowed.

      • benefits_activated array[string] | null
  • capabilities array[object] Required

    At least one capability is required

    At least 1 element.

    One of:
  • tag_id string Required

    Tag/placement identifier (e.g., 'homepage_banner', 'checkout_sidebar')

  • external_customer_id string | null

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • experienceId string Required
    • accessToken string Required
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
      • input
      • ctx object
POST /experiences
curl \
 --request POST 'http://api.example.com/experiences' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"context":{"cart":{"additionalContext":{"additionalProperty1":"string","additionalProperty2":"string"},"vibes":["adventurous"],"type":"grocery","products":[{"productId":"string","name":"string","brand":"string","price":42.0,"category":"string","quantity":1,"size":"string","unit":"string","barcode":"string","organic":false,"glutenFree":false}]},"trip":{"additionalContext":{"additionalProperty1":"string","additionalProperty2":"string"},"vibes":["adventurous"],"flight":{"departureAirport":"string","arrivalAirport":"string","departureTimestamp":42,"arrivalTimestamp":42,"numTravelers":42,"seatClass":"economy"},"cruise":{"departurePort":"string","arrivalPort":"string","departureTimestamp":42,"arrivalTimestamp":42,"numTravelers":42},"latitude":42.0,"longitude":42.0,"radiusMeters":42},"topic":{"additionalContext":{"additionalProperty1":"string","additionalProperty2":"string"},"vibes":["adventurous"],"topic":"string","questions":["string"]},"history":{"additionalContext":{"additionalProperty1":"string","additionalProperty2":"string"},"vibes":["adventurous"],"orders":[{"productId":"string","name":"string","brand":"string","category":"string","color":"string","purchasedAt":"string"}]},"customer":{"additionalContext":{"additionalProperty1":"string","additionalProperty2":"string"},"vibes":["adventurous"],"external_customer_id":"string","lifecycle_stage":"string","age_range":"string","zip_code":"string","locale":"string","membership_tier":"string","purchase_summary":{},"engagement_summary":{},"benefits_activated":["string"]}},"capabilities":[{"type":"catalog_recommendations","config":{"modelOverride":"string","allowedSources":["string"],"blockedSources":["string"],"catalogSlug":"string","maxResults":6,"budgetMax":42.0}}],"tag_id":"string","external_customer_id":"string"}'
Request examples
{
  "context": {
    "cart": {
      "additionalContext": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "vibes": [
        "adventurous"
      ],
      "type": "grocery",
      "products": [
        {
          "productId": "string",
          "name": "string",
          "brand": "string",
          "price": 42.0,
          "category": "string",
          "quantity": 1,
          "size": "string",
          "unit": "string",
          "barcode": "string",
          "organic": false,
          "glutenFree": false
        }
      ]
    },
    "trip": {
      "additionalContext": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "vibes": [
        "adventurous"
      ],
      "flight": {
        "departureAirport": "string",
        "arrivalAirport": "string",
        "departureTimestamp": 42,
        "arrivalTimestamp": 42,
        "numTravelers": 42,
        "seatClass": "economy"
      },
      "cruise": {
        "departurePort": "string",
        "arrivalPort": "string",
        "departureTimestamp": 42,
        "arrivalTimestamp": 42,
        "numTravelers": 42
      },
      "latitude": 42.0,
      "longitude": 42.0,
      "radiusMeters": 42
    },
    "topic": {
      "additionalContext": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "vibes": [
        "adventurous"
      ],
      "topic": "string",
      "questions": [
        "string"
      ]
    },
    "history": {
      "additionalContext": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "vibes": [
        "adventurous"
      ],
      "orders": [
        {
          "productId": "string",
          "name": "string",
          "brand": "string",
          "category": "string",
          "color": "string",
          "purchasedAt": "string"
        }
      ]
    },
    "customer": {
      "additionalContext": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "vibes": [
        "adventurous"
      ],
      "external_customer_id": "string",
      "lifecycle_stage": "string",
      "age_range": "string",
      "zip_code": "string",
      "locale": "string",
      "membership_tier": "string",
      "purchase_summary": {},
      "engagement_summary": {},
      "benefits_activated": [
        "string"
      ]
    }
  },
  "capabilities": [
    {
      "type": "catalog_recommendations",
      "config": {
        "modelOverride": "string",
        "allowedSources": [
          "string"
        ],
        "blockedSources": [
          "string"
        ],
        "catalogSlug": "string",
        "maxResults": 6,
        "budgetMax": 42.0
      }
    }
  ],
  "tag_id": "string",
  "external_customer_id": "string"
}
Response examples (200)
{
  "experienceId": "string",
  "accessToken": "string"
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "ctx": {}
    }
  ]
}