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 add an item to a Sync Map?

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

  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 that holds the Map.
  4. Select the Maps tab, then select the Map's SID to open it.
  5. Under Items, select Create new Map Item.
  6. 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.
  7. In Data, enter the JSON payload this item should store. This field is required.
  8. 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.
  9. In Collection time to live, optionally enter how long in seconds before the parent Map expires and is deleted.
  10. 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.

Have more questions? Submit a request
Powered by Zendesk