Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • Github
  • Youtube
  • Discord
  • X

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
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • 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.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Content Delivery API
  4. Synchronization

Synchronization

markdownView as Markdown

The Sync API takes care of syncing your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates.

Note: When executing the following synchronization API Requests, you need to pass the Delivery Token as the value to the access_token parameter.

Initial Sync

GEThttps://cdn.contentstack.io/v3/stacks/sync?init=true&content_type_uid={content_type_uid}&locale={locale_code}&start_from={iso_date}&type={type}

The Initial Sync request syncs the entries and assets of a stack, published on a specific environment.

Set init to ‘true’ if you want to sync all the published entries and assets. This is usually used when the app does not have any content and you want to get all the content for the first time.

Note When executing the API request, pass the Delivery Token as the value to the access_token parameter.

Applicable parameters:

ParameterValues
content_type_uidEnter content type UID. e.g., products
This retrieves published entries of specified content type.
localeEnter locale code. e.g., en-us
This retrieves published entries of specific locale.
start_fromEnter the start date. e.g., 2018-08-14T00:00:00.000Z
This retrieves published entries starting from a specific date.
typeApplicable values are:
  • entry_published
  • asset_published
  • entry_unpublished
  • asset_unpublished
  • entry_deleted
  • asset_deleted
  • content_type_deleted

If you do not specify any value, it will bring all published entries and published assets. You can pass multiple types as comma-separated values, for example, entry_published,entry_unpublished,asset_published.

NoteIf you specify any value for content_type_uid, locale, start_from, or type, the values for these parameters will remain unchanged for all subsequent sync requests.

Once you perform an initial sync, you will either get a sync_token or a pagination_token in response. These tokens don't have an expiry time.

You can use the sync_token later to perform subsequent sync, which fetches only new changes through delta updates.

If there are more than 100 records, you get a pagination_token in response. This token can be used to fetch the next batch of data. Read Sync using pagination token for more details.

Sample Response
123456789101112131415161718192021222324252627282930313233343536373839
{
	"items": [{
			"type": "entry_published",
			"event_at": "2017-11-23T00:00:000Z",
			"content_type_uid": "Blog",
			"data": {
                                "uid": "1",
                                "locale": "en-us",
                                "title": "My First Blog"
                        }

		},
		{
			"type": "asset_published",
			"event_at": "2017-11-22T22:59:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "3",
				"locale": "en-us",
				"title": "My Third Blog Image",
				"filename": "Blog3.jpg"
			}
		},
		{
			"type": "entry_unpublished",
			"event_at": "2017-11-22T23:50:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "2",
				"locale": "en-us",
				"title": "My Second Blog"
			}
		}
	],
	"skip": 100,
	"limit": 100,
	"total_count": 300,
	"sync_token": "blt122334455667"
}

Sync using pagination token

GEThttps://cdn.contentstack.io/v3/stacks/sync?pagination_token={pagination_token}

When running the Initial Synchronization or the Subsequent Sync request, if the result of the sync (initial or subsequent) request exceeds 100 records you will get a pagination_token.

The Sync using pagination token request uses the pagination_token to retrieve the next batch of data (100 records) while performing the sync. You can reiterate the process until you get a sync_token.

Note When executing the API request, pass the Delivery Token as the value to the access_token parameter.

Sample Response
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
{
	"items": [{
			"type": "entry_published",
			"event_at": "2017-11-23T00:00:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "1",
				"locale": "en-us",
				"title": "My First Blog"
			}

		},
		{
			"type": "entry_published",
			"event_at": "2017-11-22T23:50:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "2",
				"locale": "en-us",
				"title": "My Second Blog"
			}
		},
		{
			"type": "asset_published",
			"event_at": "2017-11-22T22:59:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "3",
				"locale": "en-us",
				"title": "My Third Blog Image",
				"filename": "Blog3.jpg"
			}
		},

		{
			"type": "entry_published",
			"event_at": "2017-12-23T00:00:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "4",
				"locale": "en-us",
				"title": "My Fourth Blog"
			}

		},
		{
			"type": "asset_published",
			"event_at": "2017-12-22T22:59:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "4",
				"locale": "en-us",
				"title": "My Fourth Blog Image",
				"filename": "Blog4.jpg"
			}
		}
	],
	"skip": 100,
	"limit": 100,
	"total_count": 300,
	"pagination_token": "blt122334455667"
}

Subsequent Sync

GEThttps://cdn.contentstack.io/v3/stacks/sync?sync_token={sync_token}

The Subsequent Sync request is used to retrieve the updated content (i.e., published or unpublished content, or any published content that has been deleted) since the last performed complete Sync.

In this API request, you need to provide the sync_token that you received in the last complete sync process. If there are more than 100 records, you will get a pagination_token instead. This token can be used to fetch the next batch of data. Refer the Sync using pagination token section for more details.

Tip Once you have performed the Initial Sync process, you do not need to perform it again. For retrieving the subsequent delta changes, use the sync_token received either in the Initial Sync process or the previous Subsequent Sync requests to sync new changes. Also, when executing the API request, pass the Delivery Token as the value to the access_token parameter.

Sample Response
123456789101112131415161718192021222324252627282930313233
{
	"items": [{
			"type": "entry_unpublished",
			"event_at": "2017-11-23T00:00:000Z",
			"content_type_uid": "Blog",
			"data": {
				"uid": "5",
				"locale": "en-us",
				"title": "My Fifth Blog"
			}
		},
		{
			"type": "asset_unpublished",
			"event_at": "2017-11-23T00:00:000Z",
			"data": {
				"uid": "5",
				"locale": "en-us",
				"title": "My Fifth Blog Image",
				"filename": "Blog6.img"
			}
		},
		{
			"type": "content_type_deleted",
			"event_at": "2017-11-22T00:00:000Z",
			"content_type_uid": "Blog Suggestions",
			"data": {}
		}
	],
	"skip": 0,
	"limit": 3,
	"total_count": 3,
	"sync_token": "blt1223344556677"
}
Hide Parameters

Query Parameters

initrequiredstring

Enter ‘true’ to perform a complete sync of all your app data.

Example:

true
content_type_uidoptionalstring

Enter the content type UID, if you want to sync entries of specific content types.

Example:

for_synchronization_calls
localeoptionalstring

Enter the locale to retrieve and sync the content published on a specific locale.

Example:

en-us
start_fromoptionalstring

Specify the start date, if you want to retrieve and sync data starting from a specific date.

Example:

2018-01-14T00:00:00.000Z
typeoptionalstring

Enter the type(s) of content you want to retrieve and sync. You can pass multiple types as comma-separated values.

Example:

entry_published, entry_unpublished, asset_published

Headers

api_keyrequiredstring

Enter the API key of your stack

Example:

blt02f7b45378b008ee
access_tokenrequiredstring

Enter the delivery token of the publishing environment. Read more.

Example:

cs5b69faf35efdebd91d08bcf4
branchoptionalstring

Example:

main
Hide Parameters

Query Parameters

pagination_tokenrequiredstring

Enter the pagination token that you received in the response body of the previous sync process.

Example:

cs45036e6b26c1396296ff34bb875480cd

Headers

api_keyrequiredstring

Enter the API key of stack of your stack.

Example:

blt02f7b45378b008ee
access_tokenrequiredstring

Enter the environment-specific delivery token of your stack. Check Authentication.

Example:

cs5b69faf35efdebd91d08bcf4
branchoptionalstring

Example:

main
Hide Parameters

Query Parameters

sync_tokenrequiredstring

Enter the sync token that you received in the response body of the previous completed Synchronization process to get the delta updates

Example:

csb17b3a47ffa057cb0b9d938c59e13ed3

Headers

api_keyrequiredstring

Enter the API key of your stack.

Example:

blt02f7b45378b008ee
access_tokenrequiredstring

Enter the environment-specific delivery token of your stack. Check Authentication.

Example:

cs5b69faf35efdebd91d08bcf4
branchoptionalstring

Example:

main