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
- In the Twilio Console, select Builder tools in the left sidebar.
- Select Sync, then Services.
- In the Name column, select the Service the Document belongs in.
- Select the Documents tab.
- Select Create Sync Document.
- 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.
- In Data, optionally enter the JSON payload this Document should store.
- 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.
- 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.