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
  • Agents Start Here
  • 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. V1
  5. Auth

Auth

markdownView as Markdown

API for creation or storage of auth tokens. Most of these

tokens are created from the Integrations/Imports setup for Lytics integrations.

Additionally, api tokens can be created/managed from this endpoint.

The oauth, config information are write only attributes that

cannot be subsequently read from the api, and is stored encrypted.

Retrieve a Single Auth

GEThttps://api.lytics.io/api/auth/{id}

This API is fairly special, as only the public portions of the auth model are

returned, not all fields **config**, **oauth2token**, and **oathtoken** fields are

never exposed.

Sample Response
Status|200 OK
12345678910
{
  "status": "success",
  "data": {
    "account_id": "4f7b525bdba058fc096757a6",
    "id": "1b53b88a06b418b07d601b6f57b8eb40",
    "provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
    "provider_name": "Facebook",
    "user_id": "4222fd7c8db7ebcb042e0547e3b4e128"
  }
}

Create Auth

POSThttps://api.lytics.io/api/auth/{id}

Create an auth, would normally never be used via the api, the web admin

Integrations section manages these.

Sample Request
123456789
{
  "provider_id": "our_provider",
  "config": [
    {
      "name": "apikey",
      "value": "value_that_will_get_encrypted"
    }
  ]
}
Sample Response
Status|201 Created
12345678910
{
  "status": "success",
  "data": {
    "account_id": "4f7b525bdba058fc096757a6",
    "id": "1b53b88a06b418b07d601b6f57b8eb40",
    "provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
    "provider_name": "Facebook",
    "user_id": "4222fd7c8db7ebcb042e0547e3b4e128"
  }
}

Update Auth

PUThttps://api.lytics.io/api/auth/{id}


Sample Response
Status|200 OK
12345678910
{
  "status": "success",
  "data": {
    "account_id": "4f7b525bdba058fc096757a6",
    "id": "1b53b88a06b418b07d601b6f57b8eb40",
    "provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
    "provider_name": "Facebook",
    "user_id": "4222fd7c8db7ebcb042e0547e3b4e128"
  }
}

Remove an Auth

DELETEhttps://api.lytics.io/api/auth/{id}

Deleting an auth is a very special operation. If any work is running (imports, exports),

it will remove the auth from those works and stop them.

Sample Response
Status|204 No Content
1
No Content

Auth Create Token

POSThttps://api.lytics.io/api/auth/createtoken

Create Lytics api tokens.

Sample Request
12345678
{
  "expires": "100h",
  "scopes": [
    "admin",
    "data"
  ],
  "name": "my-token-for-serivce-x"
}
Sample Response
Status|201 Created
123456789101112131415
{
  "status": "success",
  "data": {
    "account_id": "4f7b525bdba058fc096757a6",
    "id": "1b53b88a06b418b07d601b6f57b8eb40",
    "provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
    "name": "my-token-for-service-x",
    "provider_name": "Lytics",
    "config": [
      {
        "api_key": "api_value"
      }
    ]
  }
}
Hide Parameters

URL Parameters

idrequiredstring

ID of the Gist in the form of a hash.

Query Parameters

account_idoptionalstring

Your Lytics account ID.

access_tokenoptionalstring

Lytics API access token.

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

ID of the Gist in the form of a hash.

Query Parameters

account_idoptionalstring

Your Lytics account ID.

access_tokenoptionalstring

Lytics API access token.

Headers

Authorizationoptionalstring

Body Parameters

provider_idoptionalstring
configoptionalobject[]
config[].nameoptionalstring
config[].valueoptionalstring
Hide Parameters

URL Parameters

idrequiredstring

ID of the Gist in the form of a hash.

Query Parameters

account_idoptionalstring

Your Lytics account ID.

access_tokenoptionalstring

Lytics API access token.

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

ID of the Gist in the form of a hash.

Query Parameters

account_idoptionalstring

Your Lytics account ID.

access_tokenoptionalstring

Lytics API access token.

Headers

Authorizationoptionalstring

Hide Parameters

Query Parameters

account_idoptionalstring

Your Lytics account ID.

Headers

Authorizationoptionalstring

Body Parameters

expiresoptionalstring
scopesoptionalstring[]
nameoptionalstring