Path parameters
-
The SID of the Sync Service with the Document resource to update.
-
The SID of the Document resource to update. Can be the Document resource's
sid
or itsunique_name
.
Body
-
A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
-
How long, in seconds, before the Sync Document expires and is deleted (time-to-live).
POST
/v1/Services/{ServiceSid}/Documents/{Sid}
curl \
--request POST 'https://sync.twilio.com/v1/Services/{ServiceSid}/Documents/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "If-Match: string" \
--data 'Ttl=3600&Data=%7B%7D&UniqueName=unique_name'
Request example
{"Ttl"=>3600, "Data"=>"{}", "UniqueName"=>"unique_name"}
Response examples (200)
{
"sid": "ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents/ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"data": {},
"links": {
"permissions": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents/ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions"
},
"revision": "revision",
"created_by": "created_by",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"unique_name": "unique_name",
"date_created": "2015-07-30T20:00:00Z",
"date_expires": "2015-07-30T21:00:00Z",
"date_updated": "2015-07-30T20:00:00Z"
}