Is AI recommending you? Ask Contentstack Canoe for free
Is AI recommending your brand? Find out with Contentstack Canoe for free
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Contentstack for Developers
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • The Forrester Wave™: Digital Experience Platforms, Q4 2025
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Lytics API
  4. ML Models

ML Models

markdownView as Markdown

Get ML Models

GEThttps://api.lytics.io/v2/ml

Get a list of all ML models for the account

Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
{
  "_meta": {},
  "data": [
    {
      "additional_data": {
        "property1": "string",
        "property2": "string"
      },
      "aid": 0,
      "author_id": "string",
      "config": {
        "additional": [
          "string"
        ],
        "auto_tune": true,
        "blocked": [
          "string"
        ],
        "build_only": true,
        "collect": 0,
        "internal": true,
        "re_run": true,
        "use_content": true,
        "use_scores": true
      },
      "created": "string",
      "description": "string",
      "error": "string",
      "hidden": true,
      "id": "string",
      "is_active": true,
      "is_healthy": true,
      "label": "string",
      "name": "string",
      "source": "string",
      "state": "string",
      "target": "string",
      "type": "string",
      "updated": "string",
      "work_ids": [
        "string"
      ]
    }
  ],
  "request_id": "string",
  "status": 0
}

Post ML Model

POSThttps://api.lytics.io/v2/ml

Create an ML Model

Sample Request
12345678910111213141516171819202122232425262728293031323334353637383940
{
  "additional_data": {
    "property1": "string",
    "property2": "string"
  },
  "aid": 0,
  "author_id": "string",
  "config": {
    "additional": [
      "string"
    ],
    "auto_tune": true,
    "blocked": [
      "string"
    ],
    "build_only": true,
    "collect": 0,
    "internal": true,
    "re_run": true,
    "use_content": true,
    "use_scores": true
  },
  "created": "string",
  "description": "string",
  "error": "string",
  "hidden": true,
  "id": "string",
  "is_active": true,
  "is_healthy": true,
  "label": "string",
  "name": "string",
  "source": "string",
  "state": "string",
  "target": "string",
  "type": "string",
  "updated": "string",
  "work_ids": [
    "string"
  ]
}
Sample Response
Status|201 Created
123456789101112131415161718192021222324252627282930313233343536373839404142434445
{
  "_meta": {},
  "data": {
    "additional_data": {
      "property1": "string",
      "property2": "string"
    },
    "aid": 0,
    "author_id": "string",
    "config": {
      "additional": [
        "string"
      ],
      "auto_tune": true,
      "blocked": [
        "string"
      ],
      "build_only": true,
      "collect": 0,
      "internal": true,
      "re_run": true,
      "use_content": true,
      "use_scores": true
    },
    "created": "string",
    "description": "string",
    "error": "string",
    "hidden": true,
    "id": "string",
    "is_active": true,
    "is_healthy": true,
    "label": "string",
    "name": "string",
    "source": "string",
    "state": "string",
    "target": "string",
    "type": "string",
    "updated": "string",
    "work_ids": [
      "string"
    ]
  },
  "request_id": "string",
  "status": 0
}

Get ML Model

GEThttps://api.lytics.io/v2/ml/{id}

Get an ML model by ID

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445
{
  "_meta": {},
  "data": {
    "additional_data": {
      "property1": "string",
      "property2": "string"
    },
    "aid": 0,
    "author_id": "string",
    "config": {
      "additional": [
        "string"
      ],
      "auto_tune": true,
      "blocked": [
        "string"
      ],
      "build_only": true,
      "collect": 0,
      "internal": true,
      "re_run": true,
      "use_content": true,
      "use_scores": true
    },
    "created": "string",
    "description": "string",
    "error": "string",
    "hidden": true,
    "id": "string",
    "is_active": true,
    "is_healthy": true,
    "label": "string",
    "name": "string",
    "source": "string",
    "state": "string",
    "target": "string",
    "type": "string",
    "updated": "string",
    "work_ids": [
      "string"
    ]
  },
  "request_id": "string",
  "status": 0
}

Update ML Model

PUThttps://api.lytics.io/v2/ml/{id}

Update an ML model by ID

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445
{
  "_meta": {},
  "data": {
    "additional_data": {
      "property1": "string",
      "property2": "string"
    },
    "aid": 0,
    "author_id": "string",
    "config": {
      "additional": [
        "string"
      ],
      "auto_tune": true,
      "blocked": [
        "string"
      ],
      "build_only": true,
      "collect": 0,
      "internal": true,
      "re_run": true,
      "use_content": true,
      "use_scores": true
    },
    "created": "string",
    "description": "string",
    "error": "string",
    "hidden": true,
    "id": "string",
    "is_active": true,
    "is_healthy": true,
    "label": "string",
    "name": "string",
    "source": "string",
    "state": "string",
    "target": "string",
    "type": "string",
    "updated": "string",
    "work_ids": [
      "string"
    ]
  },
  "request_id": "string",
  "status": 0
}

Delete ML Model

DELETEhttps://api.lytics.io/v2/ml/{id}

Delete an ML model by ID

Sample Response
Status|200 OK
123456
{
  "_meta": {},
  "data": {},
  "request_id": "string",
  "status": 0
}

Get ML Model Summary

GEThttps://api.lytics.io/v2/ml/{id}/summary

Get an ML model's summary by ID

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
{
  "_meta": {},
  "data": {
    "features": [
      {
        "correlation": 0,
        "field_prevalence": {
          "source": 0,
          "target": 0
        },
        "impact": {
          "lift": 0,
          "threshold": 0,
          "value": "string"
        },
        "importance": 0,
        "kind": "string",
        "name": "string",
        "type": "string"
      }
    ],
    "id": "string",
    "name": "string",
    "state": "string",
    "summary": {
      "accuracy": 0,
      "auc": 0,
      "audience_similarity": 0,
      "error_matrix": {
        "FalseNegative": 0,
        "FalsePositive": 0,
        "TrueNegative": 0,
        "TruePositive": 0
      },
      "model_health": "string",
      "mse": 0,
      "msgs": [
        {
          "severity": "string",
          "tags": [
            "string"
          ],
          "text": "string"
        }
      ],
      "reach": 0,
      "rsq": 0,
      "source_predictions": {
        "property1": 0,
        "property2": 0
      },
      "target_predictions": {
        "property1": 0,
        "property2": 0
      },
      "threshold": 0
    }
  },
  "request_id": "string",
  "status": 0
}
Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Body Parameters

additional_dataoptionalobject
aidoptionalinteger
author_idoptionalstring

Creator of the model

configoptionalobject
config.additionaloptionalstring[]

Additional features to include in the model

config.auto_tuneoptionalboolean

Automatically search through all data fields in Lytics and build the optimized model of the best fields

config.blockedoptionalstring[]

Features to exclude from the model

config.build_onlyoptionalboolean

Train the model only, do not deploy

config.collectoptionalinteger

Number of samples to collect for training

config.internaloptionalboolean

Internal Lytics model; not visible to users

config.re_runoptionalboolean

Re-train the model every week

config.use_contentoptionalboolean

Use content affinities as features

config.use_scoresoptionalboolean

Use behavioral scores as features

createdoptionalstring

Created timestamp

descriptionoptionalstring

Description for the model

erroroptionalstring

Error from model training; set to nil if no error or "building" if model is still training

hiddenoptionalboolean

Model is hidden from the UI

idoptionalstring

ID of the model

is_activeoptionalboolean

Has model been promoted and deployed to users

is_healthyoptionalboolean

Model health

labeloptionalstring

Label for the model

nameoptionalstring

Name of the model

sourceoptionalstring

Source segment ID of the model

stateoptionalstring

State of the model, "complete", "building", or "invalid"

targetoptionalstring

Target segment ID of the model

typeoptionalstring

Model algorithm chosen from automatic tuning; random forest (rf), logistic regression (lr), or gradient boosting machine (gbm)

updatedoptionalstring

Updated timestamp for re-training

work_idsoptionalstring[]

Work IDs of the model; presence of multiple usually indicates an eval-only work, thus the model has been deployed at one point

Hide Parameters

URL Parameters

idrequiredstring

The model ID

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

The model ID

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

is_activeoptionalstring

Promote and deploy the model to users

labeloptionalstring

Label of the model

hiddenoptionalstring

Hide the model from the UI

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

The model ID

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

The model ID

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring