Objective
This article helps you add a key/value item to a Sync Map. Map Items hold the actual data in a Map, addressed by a key you choose.
Product
Twilio Sync
Environment
Twilio Console
User Account Permission/Role(s) Required
Your user role must allow reading Twilio Sync Services to open the Map, and creating them to add an item.
Procedure
- In the Twilio Console, select Builder tools in the left sidebar.
- Select Sync, then Services.
- In the Name column, select the Service that holds the Map.
- Select the Maps tab, then select the Map's SID to open it.
- Under Items, select Create new Map Item.
- In Key, enter a unique key that addresses this item within the Map. This field is required and cannot be changed once the item exists.
- In Data, enter the JSON payload this item should store. This field is required.
- In Item time to live, optionally enter how long in seconds before this item expires and is deleted. Enter 0 for an item that never expires.
- In Collection time to live, optionally enter how long in seconds before the parent Map expires and is deleted.
- Select Create. The console confirms with "Map Item created." and the item appears in the Items table.
Additional Information
- Key is required. Selecting Create without one reports "Key is a required field for creating a new Map Item."
- Data must be valid JSON. If it is not, the form reports "Data must be valid JSON." and the item is not created.
- An item payload can be up to 16 KiB serialized as UTF-8, and the key up to 320 characters.
- Both time-to-live values must be whole numbers of seconds between 0 and 31536000 (one year).
This content was generated by AI and reviewed, edited, and verified by a human.