SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How do I create a Sync Document?

Objective

This article helps you create a Sync Document inside one of your Sync Services. A Document holds a single JSON object that every subscribed client sees change in real time, which makes it a good fit for shared configuration, feature switches, or any single blob of state.

 

Product

Twilio Sync

 

Environment

Twilio Console

 

User Account Permission/Role(s) Required

Your user role must allow listing Twilio Sync Services to open the Documents tab, and creating them to add a Document.

 

Procedure

  1. In the Twilio Console, select Builder tools in the left sidebar.
  2. Select Sync, then Services.
  3. In the Name column, select the Service the Document belongs in.
  4. Select the Documents tab.
  5. Select Create Sync Document.
  6. In Unique name, optionally enter a name that identifies this Document within the Service. You can use it in place of the SID, and it cannot be changed later.
  7. In Data, optionally enter the JSON payload this Document should store.
  8. In TTL (seconds), optionally enter how long before the Document expires and is deleted. Leave it blank, or enter 0, for a Document that never expires.
  9. Select Create. The console confirms the new Document's SID and opens its details page.

 

Additional Information

  • Data must be valid JSON. If it is not, the form reports that the data must be valid JSON and the Document is not created.
  • The payload can be up to 16 KiB. The unique name can be up to 320 characters.
  • TTL must be a whole number of seconds between 0 and 31536000 (one year). 0 means the Document never expires.
  • The unique name is only available while creating a Document the edit form never offers it.
  • The Documents table shows 10 rows per page by default, and you can switch to 40 or 100.

 

This content was generated by AI and reviewed, edited, and verified by a human.

Have more questions? Submit a request
Powered by Zendesk